mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-09 02:13:35 +00:00
timeout now a flag on the root command.
It applies to all messages sent new option function WithTimeout added
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package xair
|
||||
|
||||
import "time"
|
||||
|
||||
type Option func(*engine)
|
||||
|
||||
func WithKind(kind string) Option {
|
||||
@@ -8,3 +10,9 @@ func WithKind(kind string) Option {
|
||||
e.addressMap = addressMapForMixerKind(e.Kind)
|
||||
}
|
||||
}
|
||||
|
||||
func WithTimeout(timeout time.Duration) Option {
|
||||
return func(e *engine) {
|
||||
e.timeout = timeout
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user