tsdb

package
v0.0.0-...-3e85c3f Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToContext

func ToContext(c context.Context, store Store) context.Context

ToContext adds the Store to this context if it supports the Setter interface.

Types

type ContextKey

type ContextKey string

type Store

type Store interface {
	// WriteHeartBeats write the heartbeats to db.
	WriteHeartBeats(username string, heartBeats []models.HeartBeatFrontModel) error
	// QueryHeartBeats gets all heartbeats in a given time range.
	QueryHeartBeats(begin time.Time, end time.Time) ([]models.HeartBeatFrontModel, error)
}

Store is the interface of time series data store.

func FromContext

func FromContext(c context.Context) Store

FromContext returns the Store associated with this context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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