filter

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterResult

type FilterResult string

FilterResult has the result of the filtering operation.

type Handler

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

Handler parses Cloud Events, determines if they pass a filter, and sends them to a subscriber.

func NewHandler

func NewHandler(logger *zap.Logger, triggerLister eventinglisters.TriggerNamespaceLister, reporter StatsReporter) (*Handler, error)

NewHandler creates a new Handler and its associated MessageReceiver. The caller is responsible for Start()ing the returned Handler.

func (*Handler) Start

func (r *Handler) Start(ctx context.Context) error

Start begins to receive messages for the handler.

Only HTTP POST requests to the root path (/) are accepted. If other paths or methods are needed, use the HandleRequest method directly with another HTTP server.

This method will block until a message is received on the stop channel.

type ReportArgs

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

type StatsReporter

type StatsReporter interface {
	ReportEventCount(args *ReportArgs, responseCode int) error
	ReportEventDispatchTime(args *ReportArgs, responseCode int, d time.Duration) error
	ReportEventProcessingTime(args *ReportArgs, d time.Duration) error
}

StatsReporter defines the interface for sending filter metrics.

func NewStatsReporter

func NewStatsReporter(pod, container string) StatsReporter

NewStatsReporter creates a reporter that collects and reports filter metrics.

Jump to

Keyboard shortcuts

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