sfxproto

package
v0.0.0-...-5a4be15 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2017 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package sfxproto is a generated protocol buffer package.

It is generated from these files:

sfxproto/signalfx.proto

It has these top-level messages:

Datum
Dimension
DataPoint
DataPointUploadMessage

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMarshalNoData is returned when marshaling a DataPoints and it has
	// no DataPoint values
	ErrMarshalNoData = fmt.Errorf("no data to marshal")
)
View Source
var MetricType_name = map[int32]string{
	0: "GAUGE",
	1: "COUNTER",
	2: "ENUM",
	3: "CUMULATIVE_COUNTER",
}
View Source
var MetricType_value = map[string]int32{
	"GAUGE":              0,
	"COUNTER":            1,
	"ENUM":               2,
	"CUMULATIVE_COUNTER": 3,
}

Functions

This section is empty.

Types

type DataPoint

type DataPoint struct {
	// source, field 1, was deprecated, so start at field 2
	Metric           *string      `protobuf:"bytes,2,opt,name=metric" json:"metric,omitempty"`
	Timestamp        *int64       `protobuf:"varint,3,opt,name=timestamp" json:"timestamp,omitempty"`
	Value            *Datum       `protobuf:"bytes,4,opt,name=value" json:"value,omitempty"`
	MetricType       *MetricType  `protobuf:"varint,5,opt,name=metricType,enum=sfxproto.MetricType" json:"metricType,omitempty"`
	Dimensions       []*Dimension `protobuf:"bytes,6,rep,name=dimensions" json:"dimensions,omitempty"`
	XXX_unrecognized []byte       `json:"-"`
}

func (*DataPoint) Clone

func (p *DataPoint) Clone() *DataPoint

Clone returns a deep copy of the DataPoint

func (*DataPoint) Descriptor

func (*DataPoint) Descriptor() ([]byte, []int)

func (*DataPoint) Equal

func (p *DataPoint) Equal(val *DataPoint) bool

Equal returns whether or not two DataPoint objects are equal

func (*DataPoint) GetDimensions

func (m *DataPoint) GetDimensions() []*Dimension

func (*DataPoint) GetMetric

func (m *DataPoint) GetMetric() string

func (*DataPoint) GetMetricType

func (m *DataPoint) GetMetricType() MetricType

func (*DataPoint) GetTimestamp

func (m *DataPoint) GetTimestamp() int64

func (*DataPoint) GetValue

func (m *DataPoint) GetValue() *Datum

func (*DataPoint) ProtoMessage

func (*DataPoint) ProtoMessage()

func (*DataPoint) Reset

func (m *DataPoint) Reset()

func (*DataPoint) SetTime

func (p *DataPoint) SetTime(t time.Time)

SetTime sets the timestamp of the DataPoint

func (*DataPoint) String

func (p *DataPoint) String() string

func (*DataPoint) Time

func (p *DataPoint) Time() time.Time

Time returns the timestamp of the ProtoDataPoint

type DataPointUploadMessage

type DataPointUploadMessage struct {
	Datapoints       []*DataPoint `protobuf:"bytes,1,rep,name=datapoints" json:"datapoints,omitempty"`
	XXX_unrecognized []byte       `json:"-"`
}

func (*DataPointUploadMessage) Descriptor

func (*DataPointUploadMessage) Descriptor() ([]byte, []int)

func (*DataPointUploadMessage) GetDatapoints

func (m *DataPointUploadMessage) GetDatapoints() []*DataPoint

func (*DataPointUploadMessage) ProtoMessage

func (*DataPointUploadMessage) ProtoMessage()

func (*DataPointUploadMessage) Reset

func (m *DataPointUploadMessage) Reset()

func (*DataPointUploadMessage) String

func (m *DataPointUploadMessage) String() string

type DataPoints

type DataPoints struct {
	// contains filtered or unexported fields
}

DataPoints is a set of DataPoint objects

func NewDataPoints

func NewDataPoints(l int) *DataPoints

NewDataPoints creates a new DataPoints object with expected size of l

func (*DataPoints) Add

func (ps *DataPoints) Add(dataPoint *DataPoint) *DataPoints

Add a new DataPoint to the list

func (*DataPoints) Append

func (ps *DataPoints) Append(val *DataPoints) *DataPoints

Append appends the passed DataPoints to the source object

func (*DataPoints) Len

func (ps *DataPoints) Len() int

Len returns the number of DataPoint objects the DataPoints object contains

func (*DataPoints) List

func (ps *DataPoints) List() []*DataPoint

List returns a slice of copies of each DataPoint

func (*DataPoints) Marshal

func (ps *DataPoints) Marshal() ([]byte, error)

Marshal a DataPointUploadMessage from the DataPoints object

func (*DataPoints) Remove

func (ps *DataPoints) Remove(vals ...*DataPoint) *DataPoints

Remove DataPoint(s) from the set

type Datum

type Datum struct {
	StrValue         *string  `protobuf:"bytes,1,opt,name=strValue" json:"strValue,omitempty"`
	DoubleValue      *float64 `protobuf:"fixed64,2,opt,name=doubleValue" json:"doubleValue,omitempty"`
	IntValue         *int64   `protobuf:"varint,3,opt,name=intValue" json:"intValue,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*Datum) Descriptor

func (*Datum) Descriptor() ([]byte, []int)

func (*Datum) GetDoubleValue

func (m *Datum) GetDoubleValue() float64

func (*Datum) GetIntValue

func (m *Datum) GetIntValue() int64

func (*Datum) GetStrValue

func (m *Datum) GetStrValue() string

func (*Datum) ProtoMessage

func (*Datum) ProtoMessage()

func (*Datum) Reset

func (m *Datum) Reset()

func (*Datum) String

func (m *Datum) String() string

type Dimension

type Dimension struct {
	Key              *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	Value            *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Dimension) Descriptor

func (*Dimension) Descriptor() ([]byte, []int)

func (*Dimension) GetKey

func (m *Dimension) GetKey() string

func (*Dimension) GetValue

func (m *Dimension) GetValue() string

func (*Dimension) ProtoMessage

func (*Dimension) ProtoMessage()

func (*Dimension) Reset

func (m *Dimension) Reset()

func (*Dimension) String

func (m *Dimension) String() string

type Dimensions

type Dimensions map[string]string

Dimensions is map that can be converted into []*Dimension. By itself it is not goroutine safe.

func NewDimensions

func NewDimensions(dims []*Dimension) Dimensions

NewDimensions creates a new Dimensions object from a slice of Dimension objects

func (Dimensions) Append

func (ds Dimensions) Append(val Dimensions) Dimensions

Append returns a new Dimensions object with the values of both objects merged. Keys in val will overwrite equivalent keys in ds.

func (Dimensions) Clone

func (ds Dimensions) Clone() Dimensions

Clone makes a copy of the given Dimensions object

func (Dimensions) Equal

func (ds Dimensions) Equal(r Dimensions) bool

Equal returns whether or not two sets of dimensions match exactly

func (Dimensions) List

func (ds Dimensions) List() []*Dimension

List returns a slice of all tracked Dimension objects

type MetricType

type MetricType int32
const (
	// Numerical: Periodic, instantaneous measurement of some state.
	MetricType_GAUGE MetricType = 0
	// Numerical: Count of occurrences. Generally non-negative integers.
	MetricType_COUNTER MetricType = 1
	// String: Used for non-continuous quantities (that is, measurements where
	// there is a fixed set of meaningful values). This is essentially a special
	// case of gauge.
	MetricType_ENUM MetricType = 2
	// Tracks a value that increases over time, where only the difference is
	// important.
	MetricType_CUMULATIVE_COUNTER MetricType = 3
)

func (MetricType) Enum

func (x MetricType) Enum() *MetricType

func (MetricType) EnumDescriptor

func (MetricType) EnumDescriptor() ([]byte, []int)

func (MetricType) String

func (x MetricType) String() string

func (*MetricType) UnmarshalJSON

func (x *MetricType) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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