Documentation ¶
Index ¶
- type LoadedPoint
- type Point
- func (p *Point) AppendField(key []byte, value interface{})
- func (p *Point) AppendTag(key []byte, value interface{})
- func (p *Point) ClearFieldValue(key []byte)
- func (p *Point) ClearTagValue(key []byte)
- func (p *Point) Copy(from *Point)
- func (p *Point) FieldKeys() [][]byte
- func (p *Point) FieldValues() []interface{}
- func (p *Point) GetFieldValue(key []byte) interface{}
- func (p *Point) GetTagValue(key []byte) interface{}
- func (p *Point) MeasurementName() []byte
- func (p *Point) Reset()
- func (p *Point) SetMeasurementName(s []byte)
- func (p *Point) SetTimestamp(t *time.Time)
- func (p *Point) TagKeys() [][]byte
- func (p *Point) TagValues() []interface{}
- func (p *Point) Timestamp() *time.Time
- func (p *Point) TimestampInUnixMs() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadedPoint ¶
type LoadedPoint struct {
Data interface{}
}
Point acts as a 'holder' for the internal representation of a point in a given load client. Instead of using interface{} as a return type, we get compile safety by using Point
func NewLoadedPoint ¶
func NewLoadedPoint(data interface{}) LoadedPoint
NewPoint creates a Point with the provided data as the internal representation
type Point ¶
type Point struct {
// contains filtered or unexported fields
}
Point wraps a single data point. It stores database-agnostic data representing one point in time of one measurement.
Internally, Point uses byte slices instead of strings to try to minimize overhead.
func (*Point) AppendField ¶
AppendField adds a field with a given key and value to this data point
func (*Point) ClearFieldValue ¶
ClearFieldValue sets the field value to nil for a given field key. This will panic if the internal state has been altered to not have the same number of field keys as field values.
func (*Point) ClearTagValue ¶
ClearTagValue sets the tag value to nil for a given field key. This will panic if the internal state has been altered to not have the same number of tag keys as tag values.
func (*Point) FieldValues ¶
func (p *Point) FieldValues() []interface{}
func (*Point) GetFieldValue ¶
GetFieldValue returns the corresponding value for a given field key or nil if it does not exist. This will panic if the internal state has been altered to not have the same number of field keys as field values.
func (*Point) GetTagValue ¶
GetTagValue returns the corresponding value for a given tag key or nil if it does not exist. This will panic if the internal state has been altered to not have the same number of tag keys as tag values.
func (*Point) MeasurementName ¶
MeasurementName returns the name of the Point's measurement
func (*Point) Reset ¶
func (p *Point) Reset()
Reset clears all information from this Point so it can be reused.
func (*Point) SetMeasurementName ¶
SetMeasurementName sets the name of the measurement for this data point
func (*Point) SetTimestamp ¶
SetTimestamp sets the Timestamp for this data point