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 }