| 12345678910111213141516171819202122232425262728 |
- package ds_sdk
- import "time"
- type DataSource struct {
- Name string
- Type string
- Spec map[string]any
- }
- type Options struct {
- // 必传
- token string
- baseUrl string
- namespace string
- dataSource *DataSource
- // 选传
- timeout time.Duration
- }
- type Option func(opts *Options)
- func WithTimeout(timeout time.Duration) Option {
- return func(opts *Options) {
- opts.timeout = timeout
- }
- }
|