Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator interface { // GetSegment returns segment name by given timestamp GetSegment(timestamp int64) string // ParseSegmentTime parses segment base time based on given segment name ParseSegmentTime(segmentName string) (int64, error) // CalSegmentTime calculates segment base time based on given segment name CalSegmentTime(timestamp int64) int64 // CalFamily calculates family base time based on given timestamp CalFamily(timestamp int64, segmentTime int64) int // CalFamilyStartTime calculates family start time based on segment time and family CalFamilyStartTime(segmentTime int64, family int) int64 // CalSlot calculates field store slot index based on given timestamp and base time CalSlot(timestamp, baseTime, interval int64) int }
Calculator represents calculate timestamp for each interval type
func GetCalculator ¶
func GetCalculator(intervalType Type) (Calculator, error)
GetCalculator returns calculator for given interval type
Click to show internal directories.
Click to hide internal directories.