webhook

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.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 Metrics

type Metrics interface {
	// Validation provides the metering.Summary for validation web hooks
	Validation() metering.Summary
	// Mutation provides the metering.Summary for mutation web hooks
	Mutation() metering.Summary
}

Metrics provided metrics about the webhooks

type MetricsRegistry

type MetricsRegistry interface {
	httpext.MetricsRegistry
	WebHook() Metrics
}

MetricsRegistry is an extension to httpext.MetricsRegistry

type Server

type Server struct {
	*httpext.Server // Inherit from our extended httpext.Server
	// Metrics provides the MetricsRegistry to access metrics
	Metrics MetricsRegistry
	// contains filtered or unexported fields
}

Server is the webhook server

func NewServer

func NewServer(logger logr.Logger, config *httpext.Config) (*Server, error)

NewServer creates a new webhook Server based on the provided logr.Logger, Config

func (*Server) AddMutator

func (s *Server) AddMutator(mutators ...mutation.Mutator) error

AddMutator adds a mutation.Mutator to the Server

func (*Server) AddValidator

func (s *Server) AddValidator(validators ...validation.Validator) error

AddValidator adds a validation.Validator to the Server

func (*Server) HandleAdmissionReview

func (s *Server) HandleAdmissionReview(path string, admRevHandler handler.AdmissionReview, summary metering.Summary)

HandleAdmissionReview adds a handler.AdmissionReview

Directories

Path Synopsis
nolint:dupl nolint:dupl
nolint:dupl nolint:dupl

Jump to

Keyboard shortcuts

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