Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultEncoding = ce.Binary DefaultSource = "http://knative.test" DefaultType = "dev.knative.test.event" )
CloudEvent related constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudEvent ¶
type CloudEvent struct { ce.EventContextV1 // use cloud events v1 context Data string // must be in json format Encoding string // binary or structured }
CloudEvent specifies the arguments for a CloudEvent used as input to create a new container in test.
func New ¶
func New(data string, options ...Option) *CloudEvent
New returns a new CloudEvent with most preset default properties.
type Option ¶
type Option func(*CloudEvent)
Option enables further configuration of a CloudEvent.
func WithEncoding ¶
WithType returns an option that changes the encoding for the given CloudEvent.
func WithExtensions ¶
WithExtensions returns an option that changes the extensions for the given CloudEvent.
func WithSource ¶
WithSource returns an option that changes the source for the given CloudEvent.
Click to show internal directories.
Click to hide internal directories.