clientconfig

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConnectionMethod      = errors.New("exactly one connection method has to be specified")
	ErrServiceAccountNamespaceEmpty = errors.New("service account namespace must be specified")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	api.Target
}

func New

func New(target api.Target) *Config

func (*Config) GetClient

func (c *Config) GetClient(options client.Options) (client.Client, ReloadFunc, error)

GetClient creates a client.Client for the given API target. The second return value is a function which can be used to reload the config. This reload func is a no-op for "Kubeconfig" and "ServiceAccount" target types.

func (*Config) GetRESTConfig

func (c *Config) GetRESTConfig() (*rest.Config, ReloadFunc, error)

GetRESTConfig creates a *rest.Config for the given API target. The second return value is a function which can be used to reload the config. This reload func is a no-op for "Kubeconfig" and "ServiceAccount" target types.

type ReloadFunc

type ReloadFunc func() error

Jump to

Keyboard shortcuts

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