receiver

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventIdExtractor

func EventIdExtractor(event cloudevents.Event) string

EventIdExtractor uses

event.ID()

to extract the event id

func EventTypeExtractor

func EventTypeExtractor(event cloudevents.Event) string

EventTypeExtractor uses

event.Type()

to extract the event type

func NewReceiver

func NewReceiver(paceFlag string, aggregAddr string, warmupSeconds uint, typeExtractor TypeExtractor, idExtractor IdExtractor) (common.Executor, error)

Types

type IdExtractor

type IdExtractor func(event cloudevents.Event) string

IdExtractor is used by the receiver to establish the id of the received event

type Receiver

type Receiver struct {
	// contains filtered or unexported fields
}

Receiver records the received events and sends to the aggregator. Since sender implementations can put id and type of event inside the event payload, then the Receiver uses IdExtractor and TypeExtractor to extract them

func (*Receiver) Run

func (r *Receiver) Run(ctx context.Context)

type TypeExtractor

type TypeExtractor func(event cloudevents.Event) string

TypeExtractor is used by the receiver to establish the type of the received event

Jump to

Keyboard shortcuts

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