cloudevent

package
v0.0.0-...-7c302fa Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventSink defines the endpoint for sink for cloud events
	EventSink key = iota
	// Logger is the key in context for the logget object
	Logger
)

Variables

This section is empty.

Functions

func Get

Get returns a cloud events client or error

func InjectClient

func InjectClient(ctx context.Context, client cloudevents.Client) context.Context

InjectClient allows callers to inject a cloud events client into the context with a well defined key

func SendEvent

func SendEvent(ctx context.Context, eventType CrossplaneEvent, obj metav1.Object) error

SendEvent is responsible for sending the crossplane event to the injected event sink endpoint

func SetTarget

func SetTarget(ctx context.Context, target string) context.Context

SetTarget is used to inject the sink endpoint for the cloudevents

Types

type CrossplaneEvent

type CrossplaneEvent string

CrossplaneEvent defines an event in the crossplane realm

const (
	// EnvironmentCreated is the event used when the cluster is ready
	EnvironmentCreated CrossplaneEvent = "created"
	// EnvironmentModified is the event used when the cluster is modified
	EnvironmentModified CrossplaneEvent = "modified"
)

Jump to

Keyboard shortcuts

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