Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ObjectKey = toolscache.MetaObjectToName
Functions ¶
Types ¶
type Aggregation ¶
type Aggregation struct {
*opv1a1.Aggregation
Stages []*Stage
// contains filtered or unexported fields
}
Aggregation is an operation that can be used to process, objects, or alter the shape of a list of objects in a view.
func NewAggregation ¶
func NewAggregation(engine Engine, config *opv1a1.Aggregation) *Aggregation
NewAggregation creates a new aggregation from a seralized representation.
func (*Aggregation) String ¶
func (a *Aggregation) String() string
type Engine ¶
type Engine interface {
// EvaluateJoin evaluates a join expression.
EvaluateJoin(j *Join, delta cache.Delta) ([]cache.Delta, error)
// EvaluateAggregation evaluates an aggregation pipeline.
EvaluateAggregation(a *Aggregation, delta cache.Delta) ([]cache.Delta, error)
// EvaluateStage evaluates a single aggregation stage.
EvaluateStage(s *Stage, delta cache.Delta) ([]cache.Delta, error)
// IsValidEvent returns false for some invalid events, like null-events or duplicate
// events.
IsValidEvent(cache.Delta) bool
// View returns the target view of the engine.
View() string
// WithObjects sets some base objects in the cache for testing.
WithObjects(objects ...object.Object)
// Log returns a logger.
Log() logr.Logger
}
type ErrAggregation ¶
type ErrAggregation = error
func NewAggregationError ¶
func NewAggregationError(err error) ErrAggregation
type ErrInvalidObject ¶
type ErrInvalidObject = error
func NewInvalidObjectError ¶
func NewInvalidObjectError(message string) ErrInvalidObject
type Evaluator ¶
Evaluator is a query that knows how to evaluate itself on a given delta and how to print itself.
type Join ¶
Join is an operation that can be used to perform an inner Join on a list of views.
type Pipeline ¶
type Pipeline struct {
*Join
*Aggregation
// contains filtered or unexported fields
}
Pipeline is query that knows how to evaluate itself.
type Stage ¶
type Stage struct {
*expression.Expression
// contains filtered or unexported fields
}
Stage is a single operation in an aggregation.
func NewStage ¶
func NewStage(engine Engine, e *expression.Expression) *Stage
NewStage creates a new stage from a single aggregation stage.
Click to show internal directories.
Click to hide internal directories.