Documentation ¶
Index ¶
- Constants
- Variables
- type BgWorkerSetting
- type CandleDuration
- func (cd *CandleDuration) Ceil(ts time.Time) time.Time
- func (cd *CandleDuration) Duration() time.Duration
- func (cd *CandleDuration) IsWithin(ts, start time.Time) bool
- func (cd *CandleDuration) QueryableNrecords(tf string, nrecords int) int
- func (cd *CandleDuration) QueryableTimeframe() string
- func (cd *CandleDuration) Truncate(ts time.Time) time.Time
- type MktsConfig
- type ReplicationSetting
- type Timeframe
- type TriggerSetting
Constants ¶
View Source
const ( Day = 24 * time.Hour Week = 7 * Day Year = 365 * Day )
Variables ¶
View Source
var ( Tag string GitHash string BuildStamp string )
View Source
var Timeframes = []*Timeframe{ {"1Sec", time.Second}, {"10Sec", 10 * time.Second}, {"30Sec", 30 * time.Second}, {"1Min", time.Minute}, {"5Min", 5 * time.Minute}, {"15Min", 15 * time.Minute}, {"30Min", 30 * time.Minute}, {"1H", time.Hour}, {"4H", 4 * time.Hour}, {"2H", 2 * time.Hour}, {"1D", Day}, }
Functions ¶
This section is empty.
Types ¶
type BgWorkerSetting ¶
type CandleDuration ¶
type CandleDuration struct { String string // contains filtered or unexported fields }
func CandleDurationFromString ¶
func CandleDurationFromString(tf string) (cd *CandleDuration, err error)
func (*CandleDuration) Ceil ¶
func (cd *CandleDuration) Ceil(ts time.Time) time.Time
Ceil returns the upper boundary time of this candle window that ts belongs to.
func (*CandleDuration) Duration ¶
func (cd *CandleDuration) Duration() time.Duration
func (*CandleDuration) QueryableNrecords ¶
func (cd *CandleDuration) QueryableNrecords(tf string, nrecords int) int
func (*CandleDuration) QueryableTimeframe ¶
func (cd *CandleDuration) QueryableTimeframe() string
type MktsConfig ¶
type MktsConfig struct { // RootDirectory is the absolute path to the data directory RootDirectory string ListenURL string GRPCListenURL string GRPCMaxSendMsgSize int // in bytes GRPCMaxRecvMsgSize int // in bytes UtilitiesURL string Timezone *time.Location StopGracePeriod time.Duration WALRotateInterval int DisableVariableCompression bool InitCatalog bool InitWALCache bool BackgroundSync bool WALBypass bool StartTime time.Time Replication ReplicationSetting Triggers []*TriggerSetting BgWorkers []*BgWorkerSetting }
var InstanceConfig MktsConfig
func NewDefaultConfig ¶ added in v4.1.18
func NewDefaultConfig(rootDir string) *MktsConfig
func ParseConfig ¶ added in v4.1.18
func ParseConfig(data []byte) (*MktsConfig, error)
type ReplicationSetting ¶ added in v4.1.0
type Timeframe ¶
func NewTimeframe ¶
func NewTimeframe(arg interface{}) (tf *Timeframe)
func TimeframeFromDuration ¶
func TimeframeFromString ¶
func (*Timeframe) PeriodsPerDay ¶
type TriggerSetting ¶
Click to show internal directories.
Click to hide internal directories.