utils

package
v0.0.0-...-1b5f0b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Hour         = 3600
	Day          = 24 * Hour
	MaxBlocks    = 12
	HeaderSize   = 19
	MaxPoints    = 2000000
	MaxOldBlocks = 252
)

Variables

This section is empty.

Functions

func BlockID

func BlockID(timestamp int64) int64

BlockID returns an UTC timestamp at the head of the even hour based on the given timestamp

func FromKSTS

func FromKSTS(ksts string) (ksid, tsid string)

func GetIndex

func GetIndex(timestamp int64) int

func KSTS

func KSTS(ksid, tsid string) (ksts []byte)

func MilliToSeconds

func MilliToSeconds(t int64) (int64, error)

MilliToSeconds convert timestamp in milliseconds to timestamp in seconds. An error is raised if the given timestamp is greater than 13 numbers.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL