events

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataField

type DataField struct {
	Key   string
	Value string
}

DataField represents strings key value pair used for events extra data.

type DelivererConfig

type DelivererConfig struct {
	RetryWorkers    int
	UpToDateWorkers int
	MaxBurstWorkers int
}

DelivererConfig is config of EventDeliverer component.

type EventDeliverer

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

EventDeliverer is responsible for delivering events.

func NewDeliverer

func NewDeliverer(ctx context.Context, store delivererStore, instanceID string, log logrus.FieldLogger, cfg DelivererConfig) *EventDeliverer

NewDeliverer creates new EventDeliverer component.

func (*EventDeliverer) SignalNewEvents

func (d *EventDeliverer) SignalNewEvents(eventType model.EventType)

SignalNewEvents attempts to try/retry to send to all subscriptions for particular type of event. It will throttle concurrent deliveries.

type EventProducer

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

EventProducer produces Provisioners' state change events.

func NewProducer

func NewProducer(store producerStore, signaler deliverySignaler, env string, log logrus.FieldLogger) *EventProducer

NewProducer creates new EventProducer.

func (*EventProducer) ProduceClusterInstallationStateChangeEvent

func (e *EventProducer) ProduceClusterInstallationStateChangeEvent(clusterInstallation *model.ClusterInstallation, oldState string, extraDataFields ...DataField) error

ProduceClusterInstallationStateChangeEvent produces state change event for a given ClusterInstallation.

func (*EventProducer) ProduceClusterStateChangeEvent

func (e *EventProducer) ProduceClusterStateChangeEvent(cluster *model.Cluster, oldState string, extraDataFields ...DataField) error

ProduceClusterStateChangeEvent produces state change event for a given Cluster.

func (*EventProducer) ProduceInstallationStateChangeEvent

func (e *EventProducer) ProduceInstallationStateChangeEvent(installation *model.Installation, oldState string, extraDataFields ...DataField) error

ProduceInstallationStateChangeEvent produces state change event for a given Installation.

Jump to

Keyboard shortcuts

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