types

package
v0.0.0-...-9f1f843 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EndpointAuth = Endpoint("Auth")
View Source
var EndpointNoOp = Endpoint("NoOp")
View Source
var EndpointReader = Endpoint("Reader")
View Source
var EndpointSeriesMetadata = Endpoint("SeriesCreateMetadata")
View Source
var EndpointWriter = Endpoint("Writer")
View Source
var MethodName string = "Execute"

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	SessionTicket // this will be empty 1st request, 2nd request of the auth handshake it will validate
	Nonce         string
	Signature     string
}

type AuthResponse

type AuthResponse struct {
	Error         *RpcError
	SessionId     int
	SessionSecret string
}

type Endpoint

type Endpoint string

func (Endpoint) String

func (endpoint Endpoint) String() string

type NoOpRequest

type NoOpRequest struct {
	SessionTicket
}

type NoOpResponse

type NoOpResponse struct {
	Error *RpcError
}

type ReadRequest

type ReadRequest struct {
	SessionTicket
	Queries []ReadSeriesRequest
}

type ReadResponse

type ReadResponse struct {
	Error   *RpcError
	Results map[uint64]map[uint64]float64 // map series id => timestamp => value
}

type ReadSeriesRequest

type ReadSeriesRequest struct {
	From uint64
	To   uint64
	SeriesIdentifier
}

type RpcError

type RpcError string
var RpcErrorAuthFailed RpcError = "not authenticated"
var RpcErrorBackendMetadataNotFound RpcError = "missing metadata"
var RpcErrorBackendStrategyNotFound RpcError = "no backend strategy found"
var RpcErrorMissingSeriesId RpcError = "missing series id"
var RpcErrorNoDataFound RpcError = "no data found"
var RpcErrorNoValues RpcError = "no values"
var RpcErrorNotImplemented RpcError = "not implemented"
var RpcErrorNumTimeValuePairsMisMatch RpcError = "mismatch between number of time&value pairs"
var RpcErrorSeriesExpired RpcError = "series expired"
var RpcErrorSeriesInitNoId RpcError = "series init no id"
var RpcErrorSeriesNameEmpty RpcError = "series name can not be empty"
var RpcErrorSeriesNameWhitespace RpcError = "series name can not contain whitespace"

func WrapErrorPointer

func WrapErrorPointer(err error) *RpcError

func WrapErrorStringPointer

func WrapErrorStringPointer(err string) *RpcError

func (RpcError) Error

func (err RpcError) Error() error

func (RpcError) String

func (err RpcError) String() string

type SeriesCreateIdentifier

type SeriesCreateIdentifier uint64 // xxhash64 of uuid bytes

type SeriesCreateMetadata

type SeriesCreateMetadata struct {
	SeriesMetadata
	SeriesCreateIdentifier
}

type SeriesIdentifier

type SeriesIdentifier struct {
	Namespace int
	Id        uint64
}

type SeriesMetadata

type SeriesMetadata struct {
	Namespace int
	Name      string
	Tags      []string
	Ttl       uint // relative time in seconds
}

type SeriesMetadataRequest

type SeriesMetadataRequest struct {
	// @todo support multiple series at once, will increase performance of first flushes a lot (e.g. batch size of 1000 will have 1000 round trips over TCP, have seen easily 30 seconds for that)
	SeriesCreateMetadata
	SessionTicket
}

type SeriesMetadataResponse

type SeriesMetadataResponse struct {
	Id uint64
	SeriesCreateIdentifier
	Error *RpcError
	New   bool
}

type SessionTicket

type SessionTicket struct {
	Id        int // this identifies the session
	Nonce     int // randomly generated by client
	Signature int // murmur hash truncated to int of the nonce with the secure session token
}

type WriteRequest

type WriteRequest struct {
	SessionTicket
	Series []WriteSeriesRequest
}

type WriteResponse

type WriteResponse struct {
	Num   int
	Error *RpcError
}

type WriteSeriesRequest

type WriteSeriesRequest struct {
	SeriesIdentifier
	Times  []uint64
	Values []float64
}

Jump to

Keyboard shortcuts

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