event

package
v0.0.0-...-608c54b Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Emitter

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

func NewEmitter

func NewEmitter(brokers []string, topic, source string) (*Emitter, error)

NewEmitter creates an new Emitter that emitts events in the cloud event Kafka format to the configured Kafka brokers

func (*Emitter) InstanceCreated

func (e *Emitter) InstanceCreated(ctx context.Context, instance *instancev1.Instance) error

InstanceCreated emitts an InstanceCreatedEvent

func (*Emitter) InstanceEnded

func (e *Emitter) InstanceEnded(ctx context.Context, instance *instancev1.Instance) error

InstanceEnded emitts an InstanceEndedEvent

func (*Emitter) InstanceStateChanged

func (e *Emitter) InstanceStateChanged(
	ctx context.Context,
	instance *instancev1.Instance,
	old json.RawMessage,
	new json.RawMessage,
) error

InstanceStateChanged emitts an InstanceStateChangedEvent

Jump to

Keyboard shortcuts

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