splitter

package
v1.10.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonSourceNotReady      = "NotReady"
	ReasonHandlerDeregistered = "Deregistered"
)

Reasons for API Events

Variables

This section is empty.

Functions

func EnvAccessor

func EnvAccessor() adapter.EnvConfigAccessor

EnvAccessor for configuration parameters

func NewAdapter

func NewAdapter(component string) pkgadapter.AdapterConstructor

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

func NewController

func NewController(component string) pkgadapter.ControllerConstructor

NewController returns a constructor for the event source's Reconciler.

func NewEnvConfig

func NewEnvConfig() env.ConfigAccessor

NewEnvConfig satisfies env.ConfigConstructor. Returns an accessor for the source's adapter envConfig.

Types

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 (*Handler) DeregisterHandlerFor

func (h *Handler) DeregisterHandlerFor(ctx context.Context, s *v1alpha1.Splitter) error

DeregisterHandlerFor implements MTAdapter.

func (*Handler) RegisterHandlerFor

func (h *Handler) RegisterHandlerFor(ctx context.Context, s *v1alpha1.Splitter) error

RegisterHandlerFor implements MTAdapter.

func (*Handler) ServeHTTP

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

func (*Handler) Start

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

Start begins to receive messages for the handler.

HTTP POST requests to the root path (/) are accepted.

This method will block until ctx is done.

type MTAdapter

type MTAdapter interface {
	// Registers a HTTP handler for the given source.
	RegisterHandlerFor(context.Context, *v1alpha1.Splitter) error
	// Deregisters the HTTP handler for the given source.
	DeregisterHandlerFor(context.Context, *v1alpha1.Splitter) error
}

MTAdapter allows the multi-tenant adapter to expose methods the reconciler can call while reconciling a source object.

type Reconciler

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

Reconciler implements controller.Reconciler for the event source type.

func (*Reconciler) ObserveDeletion

func (r *Reconciler) ObserveDeletion(ctx context.Context, key types.NamespacedName) error

ObserveDeletion implements reconciler.OnDeletionInterface.

func (*Reconciler) ObserveKind

func (r *Reconciler) ObserveKind(ctx context.Context, s *v1alpha1.Splitter) reconciler.Event

ObserveKind implements reconcilerv1alpha1.ReadOnlyInterface.

func (*Reconciler) ReconcileKind

func (r *Reconciler) ReconcileKind(ctx context.Context, s *v1alpha1.Splitter) reconciler.Event

ReconcileKind implements reconcilerv1alpha1.Interface.

Jump to

Keyboard shortcuts

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