mtadapter

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdapter

func NewAdapter(ctx context.Context, processed adapter.EnvConfigAccessor, ceClient cloudevents.Client) adapter.Adapter

NewAdapter returns the instance of gitHubReceiveAdapter that implements adapter.Adapter interface

func NewController

func NewController(ctx context.Context, router *Router) *controller.Impl

NewController initializes the controller and registers event handlers to enqueue events.

func NewEnvConfig

func NewEnvConfig() adapter.EnvConfigAccessor

New EnvConfig function reads env variables defined in envConfig structure and returns accessor interface

Types

type Reconciler

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

Reconciler updates the internal Adapter cache GitHubSources

func (*Reconciler) ReconcileKind

func (r *Reconciler) ReconcileKind(ctx context.Context, source *v1alpha1.GitHubSource) pkgreconciler.Event

type Router

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

Router holds the main GitHub webhook HTTP router and delegate to sub-routers

func NewRouter

func NewRouter(logger *zap.SugaredLogger, lister v1alpha1.GitHubSourceLister, ceClient cloudevents.Client) *Router

NewRouter create a new GitHub webhook router receiving GitHub events

func (*Router) Register

func (h *Router) Register(name, namespace, path string, handler http.Handler)

Register adds a new Github event handler for the given GitHubSource

func (*Router) ServeHTTP

func (h *Router) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Router) Unregister

func (h *Router) Unregister(path string)

Unregister removes the GitHubSource served at the given path

Jump to

Keyboard shortcuts

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