processors

package
v2.0.0-...-6ed2e0c Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeltaProcessor

type DeltaProcessor interface {
	// Process is the function that will process messages.
	Process(context.Context, cache.Delta) error
}

ObjectResourceMessageProcessor defines a function to process object resource messages arriving from the store.

type MeterDefinitionRemovalWatcher

type MeterDefinitionRemovalWatcher struct {
	*Processor
	// contains filtered or unexported fields
}

func ProvideMeterDefinitionRemovalWatcher

func ProvideMeterDefinitionRemovalWatcher(
	dictionary *stores.MeterDefinitionDictionary,
	meterDefinitionStore *stores.MeterDefinitionStore,
	mb *mailbox.Mailbox,
	log logr.Logger,
	kubeClient client.Client,
	nsWatcher *filter.NamespaceWatcher,
) *MeterDefinitionRemovalWatcher

func (*MeterDefinitionRemovalWatcher) Process

type Processor

type Processor struct {
	DeltaProcessor
	// contains filtered or unexported fields
}

processorImpl creates a listener and processes new object resource messages to update the meterdefinition status.

func (*Processor) Start

func (u *Processor) Start(ctx context.Context) error

Start registers the processor to the meter definition store and then executes a number of go routines that equal the max digestersSize value on the struct. The work will then wait until the context is closed, and the wait group is finished to exit.

type PrometheusMdefProcessor

type PrometheusMdefProcessor struct {
	*Processor
	// contains filtered or unexported fields
}

PrometheusMdefProcessor will update the meter definition status with the objects that matched it.

func ProvidePrometheusMdefProcessor

func ProvidePrometheusMdefProcessor(
	log logr.Logger,
	mb *mailbox.Mailbox,
	scheme *runtime.Scheme,
	prometheusData *metrics.PrometheusData,
	_ managers.CacheIsStarted,
) *PrometheusMdefProcessor

NewPrometheusMdefProcessor is the provider that creates the processor.

func (*PrometheusMdefProcessor) Process

func (u *PrometheusMdefProcessor) Process(ctx context.Context, inObj cache.Delta) error

Process will receive a new ObjectResourceMessage and find and update the metere definition associated with the object. To prevent gaps, it bulk retrieves the resources and checks it against the status.

type PrometheusProcessor

type PrometheusProcessor struct {
	*Processor
	// contains filtered or unexported fields
}

PrometheusProcessor will update the meter definition status with the objects that matched it.

func ProvidePrometheusProcessor

func ProvidePrometheusProcessor(
	log logr.Logger,
	mb *mailbox.Mailbox,
	scheme *runtime.Scheme,
	prometheusData *metrics.PrometheusData,
) *PrometheusProcessor

NewPrometheusProcessor is the provider that creates the processor.

func (*PrometheusProcessor) Process

func (u *PrometheusProcessor) Process(ctx context.Context, inObj cache.Delta) error

Process will receive a new ObjectResourceMessage and find and update the metere definition associated with the object. To prevent gaps, it bulk retrieves the resources and checks it against the status.

type ServiceAnnotatorProcessor

type ServiceAnnotatorProcessor struct {
	*Processor
	// contains filtered or unexported fields
}

ServiceProcessor will update the meter definition status with the objects that matched it.

func ProvideServiceAnnotatorProcessor

func ProvideServiceAnnotatorProcessor(
	log logr.Logger,
	kubeClient client.Client,
	mb *mailbox.Mailbox,
	_ managers.CacheIsStarted,
) *ServiceAnnotatorProcessor

NewServiceProcessor is the provider that creates the processor.

func (*ServiceAnnotatorProcessor) Process

func (w *ServiceAnnotatorProcessor) Process(ctx context.Context, inObj cache.Delta) error

Process will receive a new ObjectResourceMessage and find and update the metere definition associated with the object. To prevent gaps, it bulk retrieves the resources and checks it against the status.

type StatusFlushDuration

type StatusFlushDuration time.Duration

type StatusProcessor

type StatusProcessor struct {
	*Processor
	// contains filtered or unexported fields
}

StatusProcessor will update the meter definition status with the objects that matched it.

func ProvideStatusProcessor

func ProvideStatusProcessor(
	log logr.Logger,
	kubeClient client.Client,
	mb *mailbox.Mailbox,
	duration StatusFlushDuration,
	_ managers.CacheIsStarted,
) *StatusProcessor

NewStatusProcessor is the provider that creates the processor.

func (*StatusProcessor) Process

func (u *StatusProcessor) Process(ctx context.Context, inObj cache.Delta) error

Process will receive a new ObjectResourceMessage and find and update the metere definition associated with the object. To prevent gaps, it bulk retrieves the resources and checks it against the status.

func (*StatusProcessor) Start

func (u *StatusProcessor) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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