pool

package
v0.0.0-...-a0115ea Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryNotInitializedError

type FactoryNotInitializedError struct{}

FactoryNotInitializedError is returned when the factory is not initialized

func (FactoryNotInitializedError) Error

Error returns the error message

type PooledFactory

type PooledFactory struct {
	// contains filtered or unexported fields
}

Factory is an interface for creating clients

func NewPooledFactory

func NewPooledFactory() *PooledFactory

NewPooledFactory returns a new pooled factory

func (*PooledFactory) GetAWSClient

func (pf *PooledFactory) GetAWSClient() (bbAws.Client, error)

GetAWSClient returns the AWS client

Pooled by client (singleton)

func (*PooledFactory) GetCommandExecutor

func (pf *PooledFactory) GetCommandExecutor(
	cmd *cobra.Command,
	pod *coreV1.Pod,
	container string,
	command []string,
	stdout io.Writer,
	stderr io.Writer,
) (remoteCommand.Executor, error)

GetCommandExecutor returns the command executor

Not pooled (pass-through)

func (*PooledFactory) GetCommandWrapper

func (pf *PooledFactory) GetCommandWrapper(
	name string,
	args ...string,
) (*bbUtilApiWrappers.Command, error)

GetCommandWrapper returns the command wrapper

Not pooled (pass-through)

func (*PooledFactory) GetConfigClient

func (pf *PooledFactory) GetConfigClient(command *cobra.Command) (*bbConfig.ConfigClient, error)

GetConfigClient returns the config client

Not pooled (pass-through)

func (*PooledFactory) GetCredentialHelper

func (pf *PooledFactory) GetCredentialHelper() (credentialhelper.CredentialHelper, error)

GetCredentialHelper returns the credential helper

Pooled by helper (singleton)

func (*PooledFactory) GetFileSystemClient

func (pf *PooledFactory) GetFileSystemClient() (bbFileSystem.Client, error)

GetFileSystemClient returns a client for the underlying file system

func (*PooledFactory) GetGitLabClient

func (pf *PooledFactory) GetGitLabClient() (bbGitLab.Client, error)

GetGitLabClient returns the GitLab client

Pooled by client (singleton)

func (*PooledFactory) GetHelmClient

func (pf *PooledFactory) GetHelmClient(cmd *cobra.Command, namespace string) (helm.Client, error)

GetHelmClient returns the Helm client

Pooled by namespace, we assume cmd never changes

func (*PooledFactory) GetIOStream

func (pf *PooledFactory) GetIOStream() (*genericIOOptions.IOStreams, error)

GetIOStream returns the IO stream

Pooled by instance (singleton)

func (*PooledFactory) GetIronBankClient

func (pf *PooledFactory) GetIronBankClient() (ironbank.Client, error)

GetIronBankClient returns a client for interacting with IronBank

func (*PooledFactory) GetIstioClientSet

func (pf *PooledFactory) GetIstioClientSet(
	cfg *rest.Config,
) (bbUtilApiWrappers.IstioClientset, error)

GetIstioClientSet returns the Istio clientset

Pooled by cfg

func (*PooledFactory) GetK8sClientset

func (pf *PooledFactory) GetK8sClientset(cmd *cobra.Command) (kubernetes.Interface, error)

GetK8sClientset returns the Kubernetes clientset

Pooled by client (singleton), we assume cmd never changes

func (*PooledFactory) GetK8sDynamicClient

func (pf *PooledFactory) GetK8sDynamicClient(cmd *cobra.Command) (dynamic.Interface, error)

GetK8sDynamicClient returns the Kubernetes dynamic client

Pooled by client (singleton), we assume cmd never changes

func (*PooledFactory) GetLoggingClient

func (pf *PooledFactory) GetLoggingClient() (bbLog.Client, error)

GetLoggingClient returns the logging client

Pooled by logger (see GetLoggingClientWithLogger)

func (*PooledFactory) GetLoggingClientWithLogger

func (pf *PooledFactory) GetLoggingClientWithLogger(logger *slog.Logger) (bbLog.Client, error)

GetLoggingClientWithLogger returns the logging client with a logger

Pooled by logger

func (*PooledFactory) GetOutputClient

func (pf *PooledFactory) GetOutputClient(cmd *cobra.Command) (bbOutput.Client, error)

GetOutputClient returns the output client

Pooled by client (singleton), we assume cmd never changes

func (*PooledFactory) GetPipe

CreatePipe initializes the pipe if not already created

func (*PooledFactory) GetRestConfig

func (pf *PooledFactory) GetRestConfig(cmd *cobra.Command) (*rest.Config, error)

GetRestConfig returns the REST config

Pooled by config (singleton), we assume cmd never changes

func (*PooledFactory) GetRuntimeClient

func (pf *PooledFactory) GetRuntimeClient(scheme *runtime.Scheme) (runtimeClient.Client, error)

GetRuntimeClient returns the runtime client

Pooled by scheme

func (*PooledFactory) GetViper

func (pf *PooledFactory) GetViper() (*viper.Viper, error)

GetViper returns the Viper

Pooled by client (singleton)

func (*PooledFactory) SetUnderlyingFactory

func (pf *PooledFactory) SetUnderlyingFactory(factory bbUtil.Factory)

SetUnderlyingFactory sets the underlying factory

Jump to

Keyboard shortcuts

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