xair-cli/internal/xair/option.go
onyx-and-iris 3f8861ded2 timeout now a flag on the root command.
It applies to all messages sent

new option function WithTimeout added
2026-02-06 11:28:40 +00:00

19 lines
301 B
Go

package xair
import "time"
type Option func(*engine)
func WithKind(kind string) Option {
return func(e *engine) {
e.Kind = MixerKind(kind)
e.addressMap = addressMapForMixerKind(e.Kind)
}
}
func WithTimeout(timeout time.Duration) Option {
return func(e *engine) {
e.timeout = timeout
}
}