forwarder

package
v0.0.0-...-eee0b8a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forwarder

type Forwarder struct {
	// Name is the name of this Forwarder.
	Name string

	// The current namespace.
	Namespace string `envconfig:"NAMESPACE" required:"true"`

	// Sink
	Sink string

	// EventLogs is the list of EventLogger implementors to vent observed events.
	EventLogs *eventshub.EventLogs
	// contains filtered or unexported fields
}

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

func NewFromEnv

func NewFromEnv(ctx context.Context, eventLogs *eventshub.EventLogs, handlerFuncs []eventshub.HandlerFunc, clientOpts []eventshub.ClientOption) *Forwarder

func (*Forwarder) ServeHTTP

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

func (*Forwarder) Start

func (o *Forwarder) Start(ctx context.Context) error

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

Jump to

Keyboard shortcuts

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