| 1 | package server |
| 2 | |
| 3 | import ( |
| 4 | "time" |
| 5 | |
| 6 | "github.com/influxdata/influxdb/services/meta" |
| 7 | "github.com/influxdata/influxdb/tsdb" |
| 8 | "go.uber.org/zap" |
| 9 | ) |
| 10 | |
| 11 | type Interface interface { |
| 12 | Open(path string) error |
| 13 | Close() |
| 14 | MetaClient() MetaClient |
| 15 | TSDBConfig() tsdb.Config |
| 16 | Logger() *zap.Logger |
| 17 | } |
| 18 | |
| 19 | type MetaClient interface { |
| 20 | Database(name string) *meta.DatabaseInfo |
| 21 | RetentionPolicy(database, name string) (rpi *meta.RetentionPolicyInfo, err error) |
| 22 | ShardGroupsByTimeRange(database, policy string, min, max time.Time) (a []meta.ShardGroupInfo, err error) |
| 23 | CreateRetentionPolicy(database string, spec *meta.RetentionPolicySpec, makeDefault bool) (*meta.RetentionPolicyInfo, error) |
| 24 | UpdateRetentionPolicy(database, name string, rpu *meta.RetentionPolicyUpdate, makeDefault bool) error |
| 25 | CreateDatabase(name string) (*meta.DatabaseInfo, error) |
| 26 | CreateDatabaseWithRetentionPolicy(name string, spec *meta.RetentionPolicySpec) (*meta.DatabaseInfo, error) |
| 27 | DeleteShardGroup(database, policy string, id uint64) error |
| 28 | CreateShardGroup(database, policy string, timestamp time.Time) (*meta.ShardGroupInfo, error) |
| 29 | } |