sink

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	// ElName is the EventListener name.
	ElName string
	// ElNamespace is the EventListener namespace.
	ElNamespace string
	// Port is the port the Sink should listen on.
	Port string
}

Args define the arguments for Sink.

func GetArgs

func GetArgs() (Args, error)

GetArgs returns the flagged Args

type Clients

type Clients struct {
	DiscoveryClient discoveryclient.DiscoveryInterface
	RESTClient      restclient.Interface
	TriggersClient  triggersclientset.Interface
	PipelineClient  pipelineclientset.Interface
}

Clients define the set of client dependencies Sink requires.

func ConfigureClients

func ConfigureClients() (Clients, error)

ConfigureClients returns the kubernetes and triggers clientsets

type Response added in v0.2.0

type Response struct {
	// EventListener is the name of the eventListener
	EventListener string `json:"eventListener"`
	// Namespace is the namespace that the eventListener is running in
	Namespace string `json:"namespace,omitempty"`
	// EventID is a uniqueID that gets assigned to each incoming request
	EventID string `json:"eventID,omitempty"`
}

Response defines the HTTP body that the Sink responds to events with.

type Sink added in v0.2.0

type Sink struct {
	KubeClientSet          kubernetes.Interface
	TriggersClient         triggersclientset.Interface
	DiscoveryClient        discoveryclient.ServerResourcesInterface
	DynamicClient          dynamic.Interface
	PipelineClient         pipelineclientset.Interface
	HTTPClient             *http.Client
	EventListenerName      string
	EventListenerNamespace string
	Logger                 *zap.SugaredLogger
}

Sink defines the sink resource for processing incoming events for the EventListener.

func (Sink) HandleEvent added in v0.2.0

func (r Sink) HandleEvent(response http.ResponseWriter, request *http.Request)

HandleEvent processes an incoming HTTP event for the event listener.

Jump to

Keyboard shortcuts

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