server

package
v0.0.0-...-333c0cd Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebhookEventListener

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

The WebhookEventListener server, which listens for notifications from Gitlab

func NewWebhookEventListener

func NewWebhookEventListener(config *conf.Options) (*WebhookEventListener, error)

NewWebhookEventListener creates a new WebhookEventListener and registers a HTTP handler for /triage/system-hooks. To actually listen for webhooks you still have to call WebhookEventListener.Listen()

func (*WebhookEventListener) HookHandler

func (l *WebhookEventListener) HookHandler(w http.ResponseWriter, req *http.Request)

HookHandler handles HTTP requests, checks for the appropriate Gitlab token and may create a new Job for doing certain actions at Gitlab in response.

func (*WebhookEventListener) Listen

func (l *WebhookEventListener) Listen() error

Listen listens for HTTP requests on the port specified via the WebhookEventListener's config. This function blocks until an error occurs (e.g. if we can't bind to the port)

Jump to

Keyboard shortcuts

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