Documentation ¶
Overview ¶
Package webhook implements a generic HTTP webhook plugin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithExponentialBackoff ¶ added in v1.5.1
WithExponentialBackoff will retry webhookFn() up to 5 times with exponentially increasing backoff when it returns an error for which apierrors.SuggestsClientDelay() or apierrors.IsInternalError() returns true.
Types ¶
type GenericWebhook ¶
type GenericWebhook struct { RestClient *restclient.RESTClient // contains filtered or unexported fields }
func NewGenericWebhook ¶
func NewGenericWebhook(kubeConfigFile string, groupVersions []unversioned.GroupVersion, initialBackoff time.Duration) (*GenericWebhook, error)
NewGenericWebhook creates a new GenericWebhook from the provided kubeconfig file.
func (*GenericWebhook) WithExponentialBackoff ¶
func (g *GenericWebhook) WithExponentialBackoff(webhookFn func() restclient.Result) restclient.Result
WithExponentialBackoff will retry webhookFn() up to 5 times with exponentially increasing backoff when it returns an error for which apierrors.SuggestsClientDelay() or apierrors.IsInternalError() returns true.
Click to show internal directories.
Click to hide internal directories.