Documentation ¶
Overview ¶
Provides a set of structures for passing data around Kapacitor.
Index ¶
- func BatchToRow(b Batch) (row *models.Row)
- func PointToRow(p Point) (row *models.Row)
- func SortedFields(fields Fields) []string
- func SortedKeys(tags map[string]string) []string
- type Batch
- func (b Batch) Copy() PointInterface
- func (b Batch) PointDimensions() Dimensions
- func (b Batch) PointFields() Fields
- func (b Batch) PointGroup() GroupID
- func (b Batch) PointName() string
- func (b Batch) PointTags() Tags
- func (b Batch) PointTime() time.Time
- func (b *Batch) SetNewDimTag(key string, value string)
- func (b Batch) Setter() PointSetter
- func (b *Batch) UpdateGroup()
- type BatchPoint
- type Dimensions
- type Fields
- type GroupID
- type Point
- func (p Point) Bytes(precision string) []byte
- func (p Point) Copy() PointInterface
- func (p Point) PointDimensions() Dimensions
- func (p Point) PointFields() Fields
- func (p Point) PointGroup() GroupID
- func (p Point) PointName() string
- func (p Point) PointTags() Tags
- func (p Point) PointTime() time.Time
- func (p *Point) SetNewDimTag(key string, value string)
- func (p Point) Setter() PointSetter
- func (p *Point) UpdateGroup()
- type PointInterface
- type PointSetter
- type Tags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchToRow ¶
func PointToRow ¶
func SortedFields ¶
func SortedKeys ¶
Types ¶
type Batch ¶
type Batch struct { Name string `json:"name,omitempty"` Group GroupID `json:"-"` TMax time.Time `json:"-"` Tags Tags `json:"tags,omitempty"` Points []BatchPoint `json:"points,omitempty"` }
func (Batch) Copy ¶ added in v0.11.0
func (b Batch) Copy() PointInterface
func (Batch) PointDimensions ¶
func (b Batch) PointDimensions() Dimensions
func (Batch) PointFields ¶
func (Batch) PointGroup ¶
func (*Batch) SetNewDimTag ¶ added in v0.11.0
func (Batch) Setter ¶ added in v0.11.0
func (b Batch) Setter() PointSetter
func (*Batch) UpdateGroup ¶ added in v0.11.0
func (b *Batch) UpdateGroup()
type BatchPoint ¶
type BatchPoint struct { Time time.Time `json:"time"` Fields Fields `json:"fields"` Tags Tags `json:"tags"` }
A point in batch, similar to Point but most information is found on the containing Batch.
Tags on a BatchPoint are a superset of the tags on the Batch All points in a batch should have the same tag and field keys.
func BatchPointFromPoint ¶
func BatchPointFromPoint(p Point) BatchPoint
type Dimensions ¶ added in v0.11.0
type Dimensions []string
func (Dimensions) Copy ¶ added in v0.11.0
func (d Dimensions) Copy() Dimensions
type Point ¶
type Point struct { Name string Database string RetentionPolicy string Group GroupID Dimensions Dimensions Tags Tags Fields Fields Time time.Time }
Represents a single data point
func (Point) Copy ¶ added in v0.11.0
func (p Point) Copy() PointInterface
func (Point) PointDimensions ¶
func (p Point) PointDimensions() Dimensions
func (Point) PointFields ¶
func (Point) PointGroup ¶
func (*Point) SetNewDimTag ¶ added in v0.11.0
func (Point) Setter ¶ added in v0.11.0
func (p Point) Setter() PointSetter
func (*Point) UpdateGroup ¶ added in v0.11.0
func (p *Point) UpdateGroup()
type PointInterface ¶
type PointInterface interface { PointName() string PointTime() time.Time PointGroup() GroupID PointTags() Tags PointDimensions() Dimensions PointFields() Fields // Return a copy of self Copy() PointInterface Setter() PointSetter }
Common interface for both Point and Batch objects
type PointSetter ¶ added in v0.11.0
type PointSetter interface { PointInterface SetNewDimTag(key string, value string) UpdateGroup() }
Click to show internal directories.
Click to hide internal directories.