12345678910111213141516171819202122232425 |
- package sdk
- import (
- "time"
- )
- type Option func(opts *Options)
- func WithTimeout(timeout time.Duration) Option {
- return func(opts *Options) {
- opts.timeout = timeout
- }
- }
- type Options struct {
- // 必传
- token string
- baseUrl string
- grpcAddress string
- namespace string
- dataSource string
- // 选传
- timeout time.Duration
- }
|