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) MarshalText() (text []byte, err 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) UnmarshalText(text []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) MarshalText ¶ added in v0.12.0
MarshalText serializes this type to its textual representation.
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) UnmarshalText ¶ added in v0.12.0
UnmarshalText extracts this type from the textual representation
func (*Type) UnmarshalYAML ¶
UnmarshalYAML unmarshals text-encoded data into an transformation type.
type UnaryTransform ¶
UnaryTransform is a unary transformation that takes a single datapoint as input and transforms it into a datapoint as output.