Version: v0.28.0 Latest Latest

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 31 Imported by: 6




This section is empty.


This section is empty.


This section is empty.


type Handler

type Handler struct {
	// Receiver receives incoming HTTP requests
	Receiver *kncloudevents.HTTPMessageReceiver
	// Sender sends requests to the broker
	Sender *kncloudevents.HTTPMessageSender
	// Defaults sets default values to incoming events
	Defaulter client.EventDefaulter
	// Reporter reports stats of status code and dispatch time
	Reporter StatsReporter
	// BrokerLister gets broker objects
	BrokerLister eventinglisters.BrokerLister

	Logger *zap.Logger

func (*Handler) ServeHTTP added in v0.22.0

func (h *Handler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

func (*Handler) Start

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

type ReportArgs added in v0.9.0

type ReportArgs struct {
	// contains filtered or unexported fields

type StatsReporter added in v0.9.0

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

StatsReporter defines the interface for sending ingress metrics.

func NewStatsReporter added in v0.9.0

func NewStatsReporter(container, uniqueName string) StatsReporter

NewStatsReporter creates a reporter that collects and reports ingress metrics.

Jump to

Keyboard shortcuts

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