rec

package
v0.0.0-...-ec279c9 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package rec includes everything related to datapoint record.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecBytes

type RecBytes struct {
	Path []byte
	Val  []byte
	Time []byte

	Received time.Time
}

RecBytes represents a single piece of data (a datapoint) that can be sent.

func ParseRec

func ParseRec(s []byte, normalize bool, shouldLog bool, nowF func() time.Time, lg *zap.Logger) (*RecBytes, error)

ParseRec parses a single datapoint record from a string. Makes sure it's valid. Performs normalizations.

func (RecBytes) Copy

func (r RecBytes) Copy() (*RecBytes, error)

Copy returns a deep copy of the record

func (*RecBytes) Serialize

func (r *RecBytes) Serialize() []byte

Serialize makes record into a string ready to be sent via TCP w/ line protocol.

Jump to

Keyboard shortcuts

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