tseries

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, handler TSGenerator)

Types

type TSData added in v0.4.1

type TSData struct {
	Time  time.Time              `json:"time"`
	Value map[string]interface{} `json:"value"`
}

type TSGenerator

type TSGenerator func() TimeSerier

type TSeriesData

type TSeriesData struct {
	Measurement string
	Tags        map[string]string
	Fields      map[string]string
	Value       string
	Timestamp   int64
}

type TSeriesQueryRequest added in v0.4.1

type TSeriesQueryRequest struct {
	ID          string `json:"id"`
	StartTime   int64  `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	EndTime     int64  `protobuf:"varint,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	Identifiers string `protobuf:"bytes,4,opt,name=identifiers,proto3" json:"identifiers,omitempty"`
}

type TSeriesQueryResponse added in v0.4.1

type TSeriesQueryResponse struct {
	Items []*pb.TSResponse `json:"items"`
	ID    string           `json:"id"`
	Total int32            `json:"total"`
}

type TSeriesRequest

type TSeriesRequest struct {
	Data     interface{}       `json:"data"`
	Metadata map[string]string `json:"metadata"`
}

type TSeriesResponse

type TSeriesResponse struct {
	Data     []byte            `json:"data"`
	Metadata map[string]string `json:"metadata"`
}

type TimeSerier

type TimeSerier interface {
	Init(resource.Metadata) error
	Write(ctx context.Context, req *TSeriesRequest) (*TSeriesResponse, error)
	Query(ctx context.Context, req *pb.GetTSDataRequest) (*pb.GetTSDataResponse, error)
}

func NewTimeSerier

func NewTimeSerier(name string) TimeSerier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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