pipeline

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2019 License: Apache-2.0 Imports: 10 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationOp

type AggregationOp struct {
	// Type of aggregation performed.
	Type aggregation.Type
}

AggregationOp is an aggregation operation.

func NewAggregationOpFromProto

func NewAggregationOpFromProto(pb *pipelinepb.AggregationOp) (AggregationOp, error)

NewAggregationOpFromProto creates a new aggregation op from proto.

func (AggregationOp) Clone

func (op AggregationOp) Clone() AggregationOp

Clone clones the aggregation operation.

func (AggregationOp) Equal

func (op AggregationOp) Equal(other AggregationOp) bool

Equal determines whether two aggregation operations are equal.

func (AggregationOp) MarshalJSON

func (op AggregationOp) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of an aggregation operation.

func (AggregationOp) Proto

Proto returns the proto message for the given aggregation operation.

func (AggregationOp) String

func (op AggregationOp) String() string

func (*AggregationOp) UnmarshalJSON

func (op *AggregationOp) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals JSON-encoded data into an aggregation operation.

func (*AggregationOp) UnmarshalYAML

func (op *AggregationOp) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals YAML-encoded data into an aggregation operation.

type OpType

type OpType int

OpType defines the type of an operation.

const (
	UnknownOpType OpType = iota
	AggregationOpType
	TransformationOpType
	RollupOpType
)

List of supported operation types.

func (OpType) String

func (i OpType) String() string

type OpUnion

type OpUnion struct {
	Type           OpType
	Aggregation    AggregationOp
	Transformation TransformationOp
	Rollup         RollupOp
}

OpUnion is a union of different types of operation.

func NewOpUnionFromProto

func NewOpUnionFromProto(pb pipelinepb.PipelineOp) (OpUnion, error)

NewOpUnionFromProto creates a new operation union from proto.

func (OpUnion) Clone

func (u OpUnion) Clone() OpUnion

Clone clones an operation union.

func (OpUnion) Equal

func (u OpUnion) Equal(other OpUnion) bool

Equal determines whether two operation unions are equal.

func (OpUnion) MarshalJSON

func (u OpUnion) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of an operation union.

func (OpUnion) Proto

func (u OpUnion) Proto() (*pipelinepb.PipelineOp, error)

Proto creates a proto message for the given operation.

func (OpUnion) String

func (u OpUnion) String() string

func (*OpUnion) UnmarshalJSON

func (u *OpUnion) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals JSON-encoded data into an operation union.

func (*OpUnion) UnmarshalYAML

func (u *OpUnion) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals YAML-encoded data into an operation union.

type Pipeline

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

Pipeline is a pipeline of operations.

func NewPipeline

func NewPipeline(ops []OpUnion) Pipeline

NewPipeline creates a new pipeline.

func NewPipelineFromProto

func NewPipelineFromProto(pb *pipelinepb.Pipeline) (Pipeline, error)

NewPipelineFromProto creates a new pipeline from proto.

func (Pipeline) At

func (p Pipeline) At(i int) OpUnion

At returns the operation at a given step.

func (Pipeline) Clone

func (p Pipeline) Clone() Pipeline

Clone clones the pipeline.

func (Pipeline) Equal

func (p Pipeline) Equal(other Pipeline) bool

Equal determines whether two pipelines are equal.

func (Pipeline) IsEmpty

func (p Pipeline) IsEmpty() bool

IsEmpty determines whether a pipeline is empty.

func (Pipeline) Len

func (p Pipeline) Len() int

Len returns the number of steps in a pipeline.

func (Pipeline) MarshalJSON

func (p Pipeline) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of a pipeline.

func (Pipeline) Proto

func (p Pipeline) Proto() (*pipelinepb.Pipeline, error)

Proto returns the proto message for a given pipeline.

func (Pipeline) String

func (p Pipeline) String() string

func (Pipeline) SubPipeline

func (p Pipeline) SubPipeline(startInclusive int, endExclusive int) Pipeline

SubPipeline returns a sub-pipeline containing operations between step `startInclusive` and step `endExclusive` of the current pipeline.

func (*Pipeline) UnmarshalJSON

func (p *Pipeline) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals JSON-encoded data into a pipeline.

func (*Pipeline) UnmarshalYAML

func (p *Pipeline) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals YAML-encoded data into a pipeline.

type RollupOp

type RollupOp struct {
	// New metric name generated as a result of the rollup.
	NewName []byte
	// Dimensions along which the rollup is performed.
	Tags [][]byte
	// Types of aggregation performed within each unique dimension combination.
	AggregationID aggregation.ID
}

RollupOp is a rollup operation.

func NewRollupOpFromProto

func NewRollupOpFromProto(pb *pipelinepb.RollupOp) (RollupOp, error)

NewRollupOpFromProto creates a new rollup op from proto. NB: the rollup tags are always sorted on construction.

func (RollupOp) Clone

func (op RollupOp) Clone() RollupOp

Clone clones the rollup operation.

func (RollupOp) Equal

func (op RollupOp) Equal(other RollupOp) bool

Equal returns true if two rollup operations are equal.

func (RollupOp) MarshalJSON

func (op RollupOp) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of a rollup operation.

func (RollupOp) Proto

func (op RollupOp) Proto() (*pipelinepb.RollupOp, error)

Proto returns the proto message for the given rollup op.

func (RollupOp) SameTransform

func (op RollupOp) SameTransform(other RollupOp) bool

SameTransform returns true if the two rollup operations have the same rollup transformation (i.e., same new rollup metric name and same set of rollup tags).

func (RollupOp) String

func (op RollupOp) String() string

func (*RollupOp) UnmarshalJSON

func (op *RollupOp) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals JSON-encoded data into a rollup operation.

func (*RollupOp) UnmarshalYAML

func (op *RollupOp) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals YAML-encoded data into a rollup operation.

type TransformationOp

type TransformationOp struct {
	// Type of transformation performed.
	Type transformation.Type
}

TransformationOp is a transformation operation.

func NewTransformationOpFromProto

func NewTransformationOpFromProto(pb *pipelinepb.TransformationOp) (TransformationOp, error)

NewTransformationOpFromProto creates a new transformation op from proto.

func (TransformationOp) Clone

Clone clones the transformation operation.

func (TransformationOp) Equal

func (op TransformationOp) Equal(other TransformationOp) bool

Equal determines whether two transformation operations are equal.

func (*TransformationOp) FromProto

FromProto converts the protobuf message to a transformation in place.

func (TransformationOp) MarshalJSON

func (op TransformationOp) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of a transformation operation.

func (TransformationOp) Proto

Proto returns the proto message for the given transformation op.

func (TransformationOp) String

func (op TransformationOp) String() string

func (TransformationOp) ToProto

ToProto converts the transformation op to a protobuf message in place.

func (*TransformationOp) UnmarshalJSON

func (op *TransformationOp) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals JSON-encoded data into a transformation operation.

func (*TransformationOp) UnmarshalYAML

func (op *TransformationOp) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals YAML-encoded data into a transformation operation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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