Documentation ¶
Index ¶
- func NewCaCert() (*gardensecrets.Certificate, error)
- func NewCertConfig(name string, clientCert []byte) *clientcmdapi.Config
- func NewClientCert(caCert *gardensecrets.Certificate, commonName string, organization []string) (*gardensecrets.Certificate, error)
- func NewClientWithObjects(objs ...client.Object) client.Client
- func NewConfigData(name string) ([]byte, error)
- func NewTokenConfig(name string) *clientcmdapi.Config
- func Wrap(client client.Client) client.Client
- type Factory
- func (f *Factory) Clock() util.Clock
- func (f *Factory) Context() context.Context
- func (f *Factory) GardenHomeDir() string
- func (f *Factory) GardenTempDir() string
- func (f *Factory) Manager() (target.Manager, error)
- func (f *Factory) PublicIPs(_ context.Context) ([]string, error)
- func (f *Factory) TargetFlags() target.TargetFlags
- type TargetProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCaCert ¶
func NewCaCert() (*gardensecrets.Certificate, error)
func NewCertConfig ¶
func NewCertConfig(name string, clientCert []byte) *clientcmdapi.Config
func NewClientCert ¶
func NewClientCert(caCert *gardensecrets.Certificate, commonName string, organization []string) (*gardensecrets.Certificate, error)
func NewConfigData ¶
NewConfigData generates a Kubernetes client configuration as a byte slice.
func NewTokenConfig ¶
func NewTokenConfig(name string) *clientcmdapi.Config
NewTokenConfig generates a new Kubernetes client configuration with token authentication info.
Types ¶
type Factory ¶
type Factory struct { // ContextImpl is the root context any command should use. ContextImpl context.Context // Either set a specific Manager instance, or overwrite the // individual providers/caches down below. ManagerImpl target.Manager // Override these to customize the created manager. Config *config.Config ClientProviderImpl internalclient.Provider TargetProviderImpl target.TargetProvider TargetFlagsImpl target.TargetFlags // Override the clock implementation. Will use a real clock if not set. ClockImpl util.Clock // GardenHomeDirectory is the home directory for all gardenctl // related files. While some files can be explicitly loaded from // different locations, persistent cache files will always be placed // inside the garden home. GardenHomeDirectory string // GardenTempDirectory is the base directory for temporary data. GardenTempDirectory string }
Factory implements util.Factory interface.
func NewFakeFactory ¶
func NewFakeFactory(cfg *config.Config, clock util.Clock, clientProvider internalclient.Provider, targetProvider target.TargetProvider) *Factory
func (*Factory) GardenHomeDir ¶
func (*Factory) GardenTempDir ¶
func (*Factory) TargetFlags ¶
func (f *Factory) TargetFlags() target.TargetFlags
type TargetProvider ¶
func NewFakeTargetProvider ¶
func NewFakeTargetProvider(t target.Target) *TargetProvider
NewFakeTargetProvider returns a new TargetProvider that reads and writes from memory.
Click to show internal directories.
Click to hide internal directories.