rest

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateFromConfig

func CertificateFromConfig(cfg *rest.Config) (*tls.Certificate, error)

func ConfigWithCertificate

func ConfigWithCertificate(cfg *rest.Config, cert *tls.Certificate) (*rest.Config, error)

func DynamicCertificateConfig

func DynamicCertificateConfig(
	cfg *rest.Config,
	getCertificate func() *tls.Certificate,
	dialFunc utilnet.DialFunc,
) (*rest.Config, func(), error)

func IsConfigValid

func IsConfigValid(cfg *rest.Config) bool

func RequestConfig

func RequestConfig(
	ctx context.Context,
	certCfg *rest.Config,
	signerName string,
	template *x509.CertificateRequest,
	getUsages func(privateKey any) []certificatesv1.KeyUsage,
	requestedDuration *time.Duration,
) (*rest.Config, error)

func UseOrRequestConfig

func UseOrRequestConfig(
	ctx context.Context,
	cfg *rest.Config,
	certCfg *rest.Config,
	signerName string,
	template *x509.CertificateRequest,
	getUsages func(privateKey any) []certificatesv1.KeyUsage,
	requestedDuration *time.Duration,
) (resCfg *rest.Config, newConfig bool, err error)

Types

type ConfigRotator

type ConfigRotator interface {
	manager.Runnable
	healthz.HealthChecker
	Init(ctx context.Context, force bool) error
	ClientConfig() *rest.Config
	TransportConfig() *rest.Config
	AddListener(listener ConfigRotatorListener) ConfigRotatorListenerRegistration
	RemoveListener(reg ConfigRotatorListenerRegistration)
}

func NewConfigRotator

func NewConfigRotator(cfg, bootstrapCfg *rest.Config, opts ConfigRotatorOptions) (ConfigRotator, error)

type ConfigRotatorListener

type ConfigRotatorListener interface {
	Enqueue()
}

type ConfigRotatorListenerFunc

type ConfigRotatorListenerFunc func()

func (ConfigRotatorListenerFunc) Enqueue

func (f ConfigRotatorListenerFunc) Enqueue()

type ConfigRotatorListenerRegistration

type ConfigRotatorListenerRegistration interface{}

type ConfigRotatorOptions

type ConfigRotatorOptions struct {
	Name                  string
	SignerName            string
	Template              *x509.CertificateRequest
	GetUsages             func(privateKey any) []certificatesv1.KeyUsage
	RequestedDuration     *time.Duration
	LogConstructor        func() logr.Logger
	DialFunc              utilnet.DialFunc
	NewCertificateRotator func(opts certificate.RotatorOptions) (certificate.Rotator, error)
	ForceInitial          bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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