receiver

package
v0.40.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoOpReply

func NoOpReply(_ context.Context, writer http.ResponseWriter, _ recordevents.EventInfo)

func ReplyTransformerFunc

func ReplyTransformerFunc(replyEventType string, replyEventSource string, replyEventData string, replyAppendData string) func(context.Context, http.ResponseWriter, recordevents.EventInfo)

Types

type Receiver

type Receiver struct {
	// Name is the name of this Receiver, used to filter if multiple observers.
	Name string
	// EventLogs is the list of EventLogger implementors to vent observed events.
	EventLogs *recordevents.EventLogs
	// contains filtered or unexported fields
}

Receiver is the entry point for sinking events into the event log.

func NewFromEnv

func NewFromEnv(ctx context.Context, eventLogs *recordevents.EventLogs) *Receiver

func (*Receiver) ServeHTTP

func (o *Receiver) ServeHTTP(writer http.ResponseWriter, request *http.Request)

func (*Receiver) Start

func (o *Receiver) Start(ctx context.Context, handlerFuncs ...func(handler http.Handler) http.Handler) error

Start will create the CloudEvents client and start listening for inbound HTTP requests. This is a is a blocking call.

Jump to

Keyboard shortcuts

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