package sdk import ( "time" ) type Option func(opts *Options) func WithTimeout(timeout time.Duration) Option { return func(opts *Options) { opts.timeout = timeout } } const ( DataSourceTypeDatabase = "database" ) type DataSourceOption struct { Name string Type string Spec map[string]any } type Options struct { // 必传 token string baseUrl string namespace string dataSource *DataSourceOption // 选传 timeout time.Duration }