Documentation ¶
Index ¶
- type BinaryTransform
- type Datapoint
- type Type
- func (t Type) BinaryTransform() (BinaryTransform, error)
- func (t *Type) FromProto(pb transformationpb.TransformationType) error
- func (t Type) IsBinaryTransform() bool
- func (t Type) IsUnaryTransform() bool
- func (t Type) IsValid() bool
- func (t Type) MarshalJSON() ([]byte, error)
- func (t Type) MustBinaryTransform() BinaryTransform
- func (t Type) MustUnaryTransform() UnaryTransform
- func (i Type) String() string
- func (t Type) ToProto(pb *transformationpb.TransformationType) error
- func (t Type) UnaryTransform() (UnaryTransform, error)
- func (t *Type) UnmarshalJSON(data []byte) error
- func (t *Type) UnmarshalYAML(unmarshal func(interface{}) error) error
- type UnaryTransform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryTransform ¶
BinaryTransform is a binary transformation that takes the previous and the current datapoint as input and produces a single datapoint as the transformation result.
type Datapoint ¶
Datapoint is a metric data point containing a timestamp in Unix nanoseconds since epoch and a value.
type Type ¶
type Type int
Type defines a transformation function.
func (Type) BinaryTransform ¶
func (t Type) BinaryTransform() (BinaryTransform, error)
BinaryTransform returns the binary transformation function associated with the transformation type if applicable, or an error otherwise.
func (*Type) FromProto ¶
func (t *Type) FromProto(pb transformationpb.TransformationType) error
FromProto converts the protobuf message to a transformation type in place.
func (Type) IsBinaryTransform ¶
IsBinaryTransform returns whether this is a binary transformation.
func (Type) IsUnaryTransform ¶
IsUnaryTransform returns whether this is a unary transformation.
func (Type) MarshalJSON ¶
MarshalJSON returns the JSON encoding of a transformation type.
func (Type) MustBinaryTransform ¶
func (t Type) MustBinaryTransform() BinaryTransform
MustBinaryTransform returns the binary transformation function associated with the transformation type if applicable, or an error otherwise.
func (Type) MustUnaryTransform ¶
func (t Type) MustUnaryTransform() UnaryTransform
MustUnaryTransform returns the unary transformation function associated with the transformation type if applicable, or panics otherwise.
func (Type) ToProto ¶
func (t Type) ToProto(pb *transformationpb.TransformationType) error
ToProto converts the transformation type to a protobuf message in place.
func (Type) UnaryTransform ¶
func (t Type) UnaryTransform() (UnaryTransform, error)
UnaryTransform returns the unary transformation function associated with the transformation type if applicable, or an error otherwise.
func (*Type) UnmarshalJSON ¶
UnmarshalJSON unmarshals JSON-encoded data into a transformation type.
func (*Type) UnmarshalYAML ¶
UnmarshalYAML unmarshals YAML-encoded data into a transformation type.
type UnaryTransform ¶
UnaryTransform is a unary transformation that takes a single datapoint as input and transforms it into a datapoint as output.