mirror of https://git.sr.ht/~michalr/go-satel
Configurable pooling interval
This commit is contained in:
parent
053187c5d1
commit
8979c2dd1e
3
satel.go
3
satel.go
|
@ -21,6 +21,7 @@ type Event struct {
|
|||
type Config struct {
|
||||
EventsQueueSize int
|
||||
LongCommands bool
|
||||
PoolingInterval time.Duration
|
||||
}
|
||||
|
||||
type Satel struct {
|
||||
|
@ -65,7 +66,7 @@ func NewConfig(conn net.Conn, config Config) *Satel {
|
|||
}
|
||||
s.readRawEvents()
|
||||
}
|
||||
time.Sleep(5 * time.Second)
|
||||
time.Sleep(config.PoolingInterval)
|
||||
}
|
||||
}()
|
||||
go func() {
|
||||
|
|
Loading…
Reference in New Issue