router

package
v0.38.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

Router is a GitHub webhook router which delegates webhook events received over HTTP to sub-routers.

func New

func New(lister v1alpha1.GitHubSourceLister) *Router

New returns a new Router.

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)

ServeHTTP implements http.Handler.

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