event

package
v0.0.0-...-8011f81 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AddCluster is a kind of event which the receiver is able to handle
	AddCluster = "ADD_CLUSTER"
	// DeleteCluster is a kind of event which the receiver is able to handle
	DeleteCluster = "DELETE_CLUSTER"
	// UpdateCluster is a kind of event which the receiver is able to handle
	UpdateCluster = "UPDATE_CLUSTER"
	// GatherMetrics is a kind of event which the receiver is able to handle
	GatherMetrics = "GATHER_METRICS"
	// AddCustomConfig is a kind of event which the receiver is able to handle
	AddCustomConfig = "ADD_CUSTOM_CONFIG"
	// UpdateCustomConfig is a kind of event which the receiver is able to handle
	UpdateCustomConfig = "UPDATE_CUSTOM_CONFIG"
	// DeleteCustomConfig is a kind of event which the receiver is able to handle
	DeleteCustomConfig = "DELETE_CUSTOM_CONFIG"
	// AddService is a kind of event which the receiver is able to handle
	AddService = "ADD_SERVICE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterUpdate

type ClusterUpdate struct {
	OldCluster *v1alpha1.Cassandra
	NewCluster *v1alpha1.Cassandra
}

ClusterUpdate encapsulates Cassandra specs before and after the change

type ConfigMapChange

type ConfigMapChange struct {
	ConfigMap *v1.ConfigMap
	Cassandra *v1alpha1.Cassandra
}

ConfigMapChange encapsulates ConfigMap changes for the desired Cassandra cluster

type Event

type Event struct {
	Kind string
	Key  string
	Data interface{}
}

Event describes an event which can happen to a particular entity. Events have a kind (e.g. "created", "modified", "deleted"), a key which uniquely identifies the entity the event applies to, and event-specific data.

type OperatorEventReceiver

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

OperatorEventReceiver implements Receiver

func (*OperatorEventReceiver) Receive

func (r *OperatorEventReceiver) Receive(event *Event) error

Receive receives operator events and delegates their processing to the appropriate handler

type Receiver

type Receiver interface {
	Receive(event *Event) error
}

Receiver receives events dispatched by the operator

func NewEventReceiver

func NewEventReceiver(clusterAccessor cluster.Accessor, metricsReporter metrics.ClusterMetricsReporter, eventRecorder record.EventRecorder) Receiver

NewEventReceiver creates a new OperatorEventReceiver

Jump to

Keyboard shortcuts

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