service backend
This commit is contained in:
23
api/pkg/db/tseries/options/options.go
Normal file
23
api/pkg/db/tseries/options/options.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package tsoptions
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Granularity string
|
||||
|
||||
const (
|
||||
TSGSeconds Granularity = "seconds"
|
||||
TSGMinutes Granularity = "minutes"
|
||||
TSGHours Granularity = "hours"
|
||||
)
|
||||
|
||||
func (t Granularity) String() string { return string(t) }
|
||||
|
||||
type Options struct {
|
||||
Collection string
|
||||
TimeField string
|
||||
Granularity Granularity
|
||||
MetaField string // optional, can be empty
|
||||
ExpireAfter time.Duration // optional, zero means no TTL
|
||||
}
|
||||
Reference in New Issue
Block a user