eventutil

package
Version: v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabeledEvent

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

LabeledEvent is a wrapper of a cloudevent that allows labeling the event.

func NewLabeledEvent

func NewLabeledEvent(e *cloudevents.Event) *LabeledEvent

NewLabeledEvent creates a new LabeledEvent.

func (*LabeledEvent) Delabeled

func (le *LabeledEvent) Delabeled() *cloudevents.Event

Delabeled returns the cloudevent without labels.

func (*LabeledEvent) Event

func (le *LabeledEvent) Event() *cloudevents.Event

Event returns the LabeledEvent as a cloudevent.

func (*LabeledEvent) GetLabels

func (le *LabeledEvent) GetLabels() map[string]string

GetLabels gets all the labels as a map.

func (*LabeledEvent) WithLabel

func (le *LabeledEvent) WithLabel(key, value string) *LabeledEvent

WithLabel attaches a label to the event as an extension.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to