observer

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 Observer

type Observer struct {

	// Name is the name of this Observer, used to filter if multiple observers.
	Name string
	// EventLogs is the list of EventLog implementors to vent observed events.
	EventLogs recordevents.EventLogs
	// contains filtered or unexported fields
}

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

func NewFromEnv

func NewFromEnv(ctx context.Context, eventLogs ...recordevents.EventLog) *Observer

func (*Observer) ServeHTTP

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

func (*Observer) Start

func (o *Observer) 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