options.go 206 B

12345678910111213
  1. package client
  2. type Options struct {
  3. timeoutSec int64
  4. }
  5. type Option func(*Options)
  6. func WithTimeoutSec(timeoutSec int64) Option {
  7. return func(options *Options) {
  8. options.timeoutSec = timeoutSec
  9. }
  10. }