Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface { // AuthenticatedTransport returns a RoundTripper with the required configuration // to connect to the endpoint. AuthenticatedTransport(endpoint config.Endpoint) (http.RoundTripper, error) }
Authenticator provides an interface to generate a authorized round tripper.
type Config ¶
type Config struct { SecretListerer discovery.SecretListerer InClusterConfig *rest.Config }
type K8sClientAuthenticator ¶
type K8sClientAuthenticator struct { Config // contains filtered or unexported fields }
func New ¶
func New(config Config, opts ...OptionFunc) (*K8sClientAuthenticator, error)
New returns an K8sClientAuthenticator that supports plain, bearer token and mTLS.
func (K8sClientAuthenticator) AuthenticatedTransport ¶
func (a K8sClientAuthenticator) AuthenticatedTransport(endpoint config.Endpoint) (http.RoundTripper, error)
AuthenticatedTransport returns a round tripper according to the endpoint config. For mTLS configuration it fetches the certificates from the secret.
type OptionFunc ¶
type OptionFunc func(kca *K8sClientAuthenticator) error
func WithLogger ¶
func WithLogger(logger *log.Logger) OptionFunc
WithLogger returns an OptionFunc to change the logger from the default noop logger.
Click to show internal directories.
Click to hide internal directories.