ics

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCouldntEncode is returned when the problem occurs while trying to encode
	// an event.
	ErrCouldntEncode = errors.New("couldn't encode an event")
	// ErrCouldntDecode is returned when the problem occurs while trying to
	// decode an event.
	ErrCouldntDecode = errors.New("couldn't decode an event")
	// ErrCantConfigureICS is returned when the problem occurs while trying to
	// configure ICS sender.
	ErrCantConfigureICS = errors.New("can't configure in-cluster sender")
	// ErrICSFailed if the in-cluster sender has failed.
	ErrICSFailed = errors.New("the in-cluster sender failure")
)

Functions

func Decode

func Decode(encoded string) (*cloudevents.Event, error)

Decode will decode an event from ICS encoding.

func Encode

func Encode(ce cloudevents.Event) (string, error)

Encode will encode a cloud event to ICS encoding form: Base64(zlib(minimal JSON)).

Types

type App

type App struct {
	event.Binding
}

App holds an ICS app binding.

func (*App) SendFromEnv

func (app *App) SendFromEnv(ctx context.Context, cfg *k8s.Configurator) error

SendFromEnv will send an event based on a values stored in environmental variables.

type Args

type Args struct {
	Sink        string
	CeOverrides string
	Event       string
}

Args holds a list of args for in-cluster-sender.

Jump to

Keyboard shortcuts

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