internal

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

see https://stackoverflow.com/questions/37473201/is-there-a-way-to-update-the-tls-certificates-in-a-net-http-server-without-any-d

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 CertLoader added in v0.0.3

type CertLoader struct {
	CertFile string
	KeyFile  string
	// contains filtered or unexported fields
}

func (*CertLoader) GetCertificate added in v0.0.3

func (cr *CertLoader) GetCertificate(h *tls.ClientHelloInfo) (*tls.Certificate, error)

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