sender

package
v0.7.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ContentTypeProtobuf indicates that the data attribute is a protobuf message.
	ContentTypeProtobuf = "application/protobuf"
)

Variables

View Source
var ErrNotSupportBatch = errors.New("http sender: batch sending isn't supported")

Functions

func FromProto

func FromProto(container *cloudevents.CloudEvent) (*event.Event, error)

FromProto Convert from a protobuf variant into the generic, SDK event.

func ToProto

func ToProto(e *event.Event) (*cloudevents.CloudEvent, error)

ToProto convert an SDK event to a protobuf variant of the event that can be marshaled.

Types

type CloudEventSender

type CloudEventSender interface {
	SendEvent(ctx context.Context, events ...*ce.Event) error
}

func NewHTTPSender

func NewHTTPSender(target string) CloudEventSender

func NewVanusSender

func NewVanusSender(endpoint string, eventbus string) CloudEventSender

Jump to

Keyboard shortcuts

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