listener

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, hubconfig *rest.Config, tlsKeyFile, tlsCrtFile string) error

Add does nothing for namespace subscriber, it generates cache for each of the item

Types

type WebhookListener

type WebhookListener struct {
	LocalClient   client.Client
	RemoteClient  client.Client
	DynamicClient dynamic.Interface
	TLSKeyFile    string
	TLSCrtFile    string
	// contains filtered or unexported fields
}

WebhookListener is a generic webhook event listener

func CreateWebhookListener

func CreateWebhookListener(config, remoteConfig *rest.Config, scheme *runtime.Scheme, tlsKeyFile, tlsCrtFile string) (*WebhookListener, error)

CreateWebhookListener creates a WebHook listener instance

func (*WebhookListener) HandleWebhook

func (listener *WebhookListener) HandleWebhook(w http.ResponseWriter, r *http.Request)

HandleWebhook handles incoming webhook events

func (*WebhookListener) ParseRequest

func (listener *WebhookListener) ParseRequest(r *http.Request) (body []byte, signature string, event interface{}, err error)

ParseRequest parses incoming WebHook event request

func (*WebhookListener) Start

func (listener *WebhookListener) Start(l <-chan struct{}) error

Start the GutHub WebHook event listener

Jump to

Keyboard shortcuts

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