aggregator

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: Apache-2.0 Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAggregator

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

BasicAggregator implements StatusAggregator. Aggregate status will be Current when all polled resources are either Current or NotFound. TODO: Treating resources that doesn't exist as Current is weird. But it kinda does make sense when we track resources that are deleted/pruned. We should see if there is a better way to handle this.

func NewAllCurrentOrNotFoundStatusAggregator

func NewAllCurrentOrNotFoundStatusAggregator(identifiers []wait.ResourceIdentifier) *BasicAggregator

NewBasicAggregator returns a BasicAggregator that will track resources identified by the argument.

func (*BasicAggregator) AggregateStatus

func (d *BasicAggregator) AggregateStatus() status.Status

AggregateStatus computes the aggregate status for all the resources. In this implementation of the Aggregator, we treat resources with the NotFound status as Current.

func (*BasicAggregator) Completed

func (d *BasicAggregator) Completed() bool

Completed is used by the framework to decide if the set of resources has all reached the desired status, i.e. the aggregate status. This is used to determine when to stop polling resources.

func (*BasicAggregator) ResourceStatus

func (d *BasicAggregator) ResourceStatus(r *event.ResourceStatus)

ResourceStatus is called whenever we have an observation of a resource. In this case, we just keep the latest status so we can later compute the aggregate status for all the resources.

Jump to

Keyboard shortcuts

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