protocol

package
v0.0.0-...-32ff608 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CloudEvents = "cloudevents"
)

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	// ToCloudEvent transform protocol to CloudEvent
	ToCloudEvent(interface{}) (*cloudv2.Event, error)

	//ToCloudEvents transform protocol to CloudEvent list.
	ToCloudEvents(interface{}) ([]*cloudv2.Event, error)

	//FromCloudEvent transfor CloudEvent to target protocol.
	FromCloudEvent(event *cloudv2.Event) (interface{}, error)

	// ProtocolType protocol type, protocol type should not be null
	ProtocolType() string
}

Adapter protocol adapter transfer the message with given protocol and events message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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