webhook

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWebhook

func RegisterWebhook(w *Webhook) error

RegisterWebhook registers a new webhook within the webhook registry. This function will return an error if it tries to register two webhooks with the same unique identifier.

Types

type Webhook

type Webhook struct {
	Type       string
	CRDKind    string
	APIVersion string
	// Setup is used to register the webhook within
	// the webhook manager
	Setup func(ctrlrt.Manager) error
}

Webhook contains information about a custom Webhook

func GetWebhooks

func GetWebhooks() []*Webhook

GetWebhooks returns the list of webhooks that were registred with RegisterWebhook function.

func New

func New(
	apiVersion string,
	crdKind string,
	type_ string,
	setupFunc func(ctrlrt.Manager) error,
) *Webhook

New instanciate a new webhook object pointer.

func (*Webhook) UID

func (w *Webhook) UID() string

UID returns a unique identifier for the webhook. Webhooks must be unique per CRD and APIVersion.

type WebhookType

type WebhookType string
const (
	WebhookTypeUnknown    WebhookType = "unknown"
	WebhookTypeConversion WebhookType = "conversion"
)

Jump to

Keyboard shortcuts

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