cloudevent

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToContext

func ToContext(ctx context.Context, cec CEClient) context.Context

ToContext adds the cloud events client to the context

Types

type CECKey

type CECKey struct{}

CECKey is used to associate the CloudEventClient inside the context.Context

type CEClient

type CEClient cloudevents.Client

CEClient matches the `Client` interface from github.com/cloudevents/sdk-go/v2/cloudevents

func Get

func Get(ctx context.Context) CEClient

Get extracts the cloudEventClient client from the context.

type Resource

type Resource struct {
	EventID   string
	EventType string
	TargetURI string
	Client    CEClient
	Logger    *zap.SugaredLogger
	Data      []byte
	EL        triggersv1.EventListener
}

Resource structure defines parameters needed to send cloudEvents

func (Resource) SendCloudEvents

func (r Resource) SendCloudEvents()

SendCloudEvents is used by the EventListener to send cloud events status of trigger processing

Jump to

Keyboard shortcuts

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