internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug = log.New(os.Stderr, "DEBUG: ", log.Ltime|log.Lshortfile)
	Info  = log.New(os.Stderr, "INFO:  ", log.Ltime|log.Lshortfile)
	Error = log.New(os.Stderr, "ERROR: ", log.Ltime|log.Lshortfile)
)

Functions

func AdmitHandler

func AdmitHandler(f admitv1Func) admitHandler

Types

type Service

type Service struct {
	Opts      ServiceOpts
	Ctx       context.Context
	Config    *rest.Config
	Clientset *kubernetes.Clientset
}

func NewService

func NewService(opts ServiceOpts) (*Service, error)

func (*Service) Mutate

func (*Service) Run

func (s *Service) Run(stop <-chan os.Signal) error

func (*Service) ServeAdmitHandler

func (s *Service) ServeAdmitHandler(w http.ResponseWriter, r *http.Request, admit admitHandler)

serve handles the http portion of a request prior to handing to an admit function

type ServiceOpts

type ServiceOpts struct {
	TLSCertFile string
	TLSKeyFile  string
}

Jump to

Keyboard shortcuts

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