Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseOption ¶
type DatabaseOption struct { // write interval(the number of second) => TTL // rollup intervals(like seconds->minute->hour->day) Intervals Intervals `toml:"intervals" json:"intervals,omitempty" validate:"required"` // auto create namespace AutoCreateNS bool `toml:"autoCreateNS" json:"autoCreateNS,omitempty"` Behind string `toml:"behind" json:"behind,omitempty"` // allowed timestamp write behind Ahead string `toml:"ahead" json:"ahead,omitempty"` // allowed timestamp write ahead Index FlusherOption `toml:"index" json:"index,omitempty"` // index flusher option Data FlusherOption `toml:"data" json:"data,omitempty"` // data flusher data // contains filtered or unexported fields }
DatabaseOption represents a database option include shard ids and shard's option
func (*DatabaseOption) Default ¶
func (e *DatabaseOption) Default()
Default sets default value if some configuration item not set.
func (*DatabaseOption) FindMatchSmallestInterval ¶
func (e *DatabaseOption) FindMatchSmallestInterval(interval timeutil.Interval) timeutil.Interval
FindMatchSmallestInterval returns the smallest interval which match query interval.
func (*DatabaseOption) GetAcceptWritableRange ¶
func (e *DatabaseOption) GetAcceptWritableRange() (ahead, behind int64)
GetAcceptWritableRange returns accept writable time range.
func (*DatabaseOption) Validate ¶
func (e *DatabaseOption) Validate() error
Validate validates engine option if valid
type FlusherOption ¶
type FlusherOption struct { TimeThreshold int64 `toml:"timeThreshold" json:"timeThreshold"` // time level flush threshold SizeThreshold int64 `toml:"sizeThreshold" json:"sizeThreshold"` // size level flush threshold, unit(MB) }
FlusherOption represents a flusher configuration for index and memory db
type Interval ¶
type Interval struct { Interval timeutil.Interval `toml:"interval" json:"interval,omitempty" validate:"required"` Retention timeutil.Interval `toml:"retention" json:"retention,omitempty" validate:"required"` }
Interval represents the database's interval option, include interval and data retention.
Click to show internal directories.
Click to hide internal directories.