Documentation ¶
Index ¶
Constants ¶
const ( Nanosecond = iota Second )
constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Float ¶
Float implements the Field interface. Key is the line protocol field key as a byte slice. Value is the float key value for the field.
type Int ¶
Int implements the Field interface. Key is the line protocol field key as a byte slice. Value is the integer key value for the field.
Not that Value occurs before Key in the Int struct. The reason for this is that on both ARM and x86-32, it is the caller's responsibility to arrange for 64-bit alignment of 64-bit words accessed atomically. The first word in a global variable or in an allocated struct or slice can be relied upon to be 64-bit aligned.
type Point ¶
type Point interface { // Byte slice representing the series key for a point. Series() []byte // Slice of Field (alais for io.WriterTo) interfaces. Fields() []Field Time() *Timestamp SetTime(time.Time) // Update is intended to be used to mutate field values. Update() }
Point defines values that will be written in line protocol.
type String ¶
String implements the Field interface. - Key is the line protocol field key as a byte slice. - Value is the string value for the field.
type Timestamp ¶
type Timestamp struct {
// contains filtered or unexported fields
}
Timestamp represents a timestamp in line protocol in either second or nanosecond precision.
func NewTimestamp ¶
NewTimestamp returns a pointer to a Timestamp.
func (*Timestamp) SetTime ¶
SetTime takes an pointer to a time.Time and atomically sets the pointer on the Timestamp struct.