applied

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OperationsFromProto added in v1.2.0

func OperationsFromProto(pb []pipelinepb.AppliedPipelineOp, ops []OpUnion) error

OperationsFromProto converts a list of protobuf AppliedPipelineOps, used in optimized staged metadata methods.

Types

type OpUnion

type OpUnion struct {
	Rollup         RollupOp
	Type           pipeline.OpType
	Transformation pipeline.TransformationOp
}

OpUnion is a union of different types of operation.

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) FromProto

func (u *OpUnion) FromProto(pb pipelinepb.AppliedPipelineOp) error

FromProto converts the protobuf message to an applied pipeline op in place.

func (*OpUnion) Reset

func (u *OpUnion) Reset()

Reset resets the operation union.

func (OpUnion) String

func (u OpUnion) String() string

func (OpUnion) ToProto

func (u OpUnion) ToProto(pb *pipelinepb.AppliedPipelineOp) error

ToProto converts the applied pipeline op to a protobuf message in place.

type Pipeline

type Pipeline struct {
	// a list of pipeline Operations.
	Operations []OpUnion
}

Pipeline is a pipeline of operations.

var (
	// DefaultPipeline is a default pipeline.
	DefaultPipeline Pipeline
)

func NewPipeline

func NewPipeline(ops []OpUnion) Pipeline

NewPipeline creates a new pipeline.

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) FromProto

func (p *Pipeline) FromProto(pb pipelinepb.AppliedPipeline) error

FromProto converts the protobuf message to an applied pipeline in place.

func (Pipeline) IsEmpty

func (p Pipeline) IsEmpty() bool

IsEmpty determines whether a pipeline is empty.

func (Pipeline) IsMappingRule added in v1.2.0

func (p Pipeline) IsMappingRule() bool

IsMappingRule returns whether this is a mapping rule, determined by if any rollup pipelines are included.

func (Pipeline) Len

func (p Pipeline) Len() int

Len returns the number of steps in a pipeline.

func (Pipeline) Less added in v1.4.0

func (p Pipeline) Less(i, j int) bool

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) Swap added in v1.4.0

func (p Pipeline) Swap(i, j int)

func (Pipeline) ToProto

func (p Pipeline) ToProto(pb *pipelinepb.AppliedPipeline) error

ToProto converts the applied pipeline to a protobuf message in place.

func (Pipeline) WithResets added in v1.2.0

func (p Pipeline) WithResets() Pipeline

WithResets returns a new Pipeline with Add transformations replaced with Reset transformations. See transformReset for why Reset should be used instead of Add.

type RollupOp

type RollupOp struct {
	// Metric ID generated as a result of the rollup.
	ID []byte
	// Type of aggregations performed within each unique dimension combination.
	AggregationID aggregation.ID
}

RollupOp captures the rollup metadata after the operation is applied against a metric ID.

func (RollupOp) Clone

func (op RollupOp) Clone() RollupOp

Clone clones the rollup operation.

func (RollupOp) Equal

func (op RollupOp) Equal(other RollupOp) bool

Equal determines whether two rollup Operations are equal.

func (*RollupOp) FromProto

func (op *RollupOp) FromProto(pb pipelinepb.AppliedRollupOp) error

FromProto converts the protobuf message to an applied rollup op in place.

func (RollupOp) String

func (op RollupOp) String() string

func (RollupOp) ToProto

func (op RollupOp) ToProto(pb *pipelinepb.AppliedRollupOp) error

ToProto converts the applied rollup op to a protobuf message in place.

Jump to

Keyboard shortcuts

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