Documentation
¶
Index ¶
- type DefaultKubeProvider
- func (p *DefaultKubeProvider) AdditionalClientsCount() int
- func (p *DefaultKubeProvider) Cleanup(context.Context) error
- func (p *DefaultKubeProvider) Client(ctx context.Context) (connection.KubeClient, error)
- func (p *DefaultKubeProvider) HasCurrent() bool
- func (p *DefaultKubeProvider) NewAdditionalClient(ctx context.Context) (connection.KubeClient, error)
- func (p *DefaultKubeProvider) NewAdditionalClientWithoutInitialize(ctx context.Context) (connection.KubeClient, error)
- func (p *DefaultKubeProvider) WithLoopsParams(l KubeProviderLoopsParams) *DefaultKubeProvider
- type DefaultSSHProvider
- func (p *DefaultSSHProvider) AdditionalClients() []connection.SSHClient
- func (p *DefaultSSHProvider) Cleanup(context.Context) error
- func (p *DefaultSSHProvider) Client(ctx context.Context) (connection.SSHClient, error)
- func (p *DefaultSSHProvider) HasCurrent() bool
- func (p *DefaultSSHProvider) NewAdditionalClient(ctx context.Context) (connection.SSHClient, error)
- func (p *DefaultSSHProvider) NewStandaloneClient(ctx context.Context, sess *session.Session, ...) (connection.SSHClient, error)
- func (p *DefaultSSHProvider) SwitchClient(ctx context.Context, sess *session.Session, ...) (connection.SSHClient, error)
- func (p *DefaultSSHProvider) SwitchToDefault(ctx context.Context) (connection.SSHClient, error)
- func (p *DefaultSSHProvider) WithID(id string) *DefaultSSHProvider
- func (p *DefaultSSHProvider) WithOptions(opts ...SSHClientOption) *DefaultSSHProvider
- type ErrorSSHProvider
- func (p *ErrorSSHProvider) Cleanup(context.Context) error
- func (p *ErrorSSHProvider) Client(context.Context) (connection.SSHClient, error)
- func (p *ErrorSSHProvider) NewAdditionalClient(context.Context) (connection.SSHClient, error)
- func (p *ErrorSSHProvider) NewStandaloneClient(context.Context, *session.Session, []session.AgentPrivateKey, ...) (connection.SSHClient, error)
- func (p *ErrorSSHProvider) SwitchClient(context.Context, *session.Session, []session.AgentPrivateKey) (connection.SSHClient, error)
- func (p *ErrorSSHProvider) SwitchToDefault(context.Context) (connection.SSHClient, error)
- type FakeKubeProvider
- func (p *FakeKubeProvider) Cleanup(context.Context) error
- func (p *FakeKubeProvider) Client(context.Context) (connection.KubeClient, error)
- func (p *FakeKubeProvider) NewAdditionalClient(ctx context.Context) (connection.KubeClient, error)
- func (p *FakeKubeProvider) NewAdditionalClientWithoutInitialize(ctx context.Context) (connection.KubeClient, error)
- type KubeProviderLoopsParams
- type RunnerInterface
- type RunnerInterfaceLocal
- func (r *RunnerInterfaceLocal) Finalize(bool)
- func (r *RunnerInterfaceLocal) InitOptions() []kube.InitOpt
- func (r *RunnerInterfaceLocal) IsSwitched(context.Context) (bool, error)
- func (r *RunnerInterfaceLocal) SetNodeInterface(_ context.Context, client *kube.KubernetesClient, _ ...SetNodeInterfaceOpt) error
- type RunnerInterfaceNoAction
- func (*RunnerInterfaceNoAction) Finalize(bool)
- func (*RunnerInterfaceNoAction) InitOptions() []kube.InitOpt
- func (*RunnerInterfaceNoAction) IsSwitched(context.Context) (bool, error)
- func (*RunnerInterfaceNoAction) SetNodeInterface(context.Context, *kube.KubernetesClient, ...SetNodeInterfaceOpt) error
- type RunnerInterfaceOpt
- type RunnerInterfaceSSH
- func (r *RunnerInterfaceSSH) Finalize(isError bool)
- func (r *RunnerInterfaceSSH) InitOptions() []kube.InitOpt
- func (r *RunnerInterfaceSSH) IsSwitched(ctx context.Context) (bool, error)
- func (r *RunnerInterfaceSSH) SetNodeInterface(ctx context.Context, client *kube.KubernetesClient, ...) error
- func (r *RunnerInterfaceSSH) WithInitOptions(opts ...kube.InitOpt) *RunnerInterfaceSSH
- func (r *RunnerInterfaceSSH) WithLoopParams(p RunnerInterfaceSSHLoopsParams) *RunnerInterfaceSSH
- type RunnerInterfaceSSHLoopsParams
- type SSHClientOption
- type SSHClientOptions
- type SetNodeInterfaceOpt
- type SetNodeInterfaceOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultKubeProvider ¶
type DefaultKubeProvider struct {
// contains filtered or unexported fields
}
func NewDefaultKubeProvider ¶
func NewDefaultKubeProvider(sett settings.Settings, config *kube.Config, runnerInterface RunnerInterface) *DefaultKubeProvider
NewDefaultKubeProvider if use rest config sshProvider can be nil
func (*DefaultKubeProvider) AdditionalClientsCount ¶
func (p *DefaultKubeProvider) AdditionalClientsCount() int
func (*DefaultKubeProvider) Client ¶
func (p *DefaultKubeProvider) Client(ctx context.Context) (connection.KubeClient, error)
func (*DefaultKubeProvider) HasCurrent ¶
func (p *DefaultKubeProvider) HasCurrent() bool
func (*DefaultKubeProvider) NewAdditionalClient ¶
func (p *DefaultKubeProvider) NewAdditionalClient(ctx context.Context) (connection.KubeClient, error)
func (*DefaultKubeProvider) NewAdditionalClientWithoutInitialize ¶
func (p *DefaultKubeProvider) NewAdditionalClientWithoutInitialize(ctx context.Context) (connection.KubeClient, error)
NewAdditionalClientWithoutInitialize create new additional client without initialize
func (*DefaultKubeProvider) WithLoopsParams ¶
func (p *DefaultKubeProvider) WithLoopsParams(l KubeProviderLoopsParams) *DefaultKubeProvider
type DefaultSSHProvider ¶
type DefaultSSHProvider struct {
// contains filtered or unexported fields
}
func NewDefaultSSHProvider ¶
func NewDefaultSSHProvider(sett settings.Settings, config *sshconfig.ConnectionConfig, opts ...SSHClientOption) *DefaultSSHProvider
func NewDefaultSSHProviderFromFlags ¶
func NewDefaultSSHProviderFromFlags(sett settings.Settings, flags *sshconfig.Flags, opts ...sshconfig.ValidateOption) (*DefaultSSHProvider, error)
func (*DefaultSSHProvider) AdditionalClients ¶
func (p *DefaultSSHProvider) AdditionalClients() []connection.SSHClient
AdditionalClients please use for testing purposes only!
func (*DefaultSSHProvider) Client ¶
func (p *DefaultSSHProvider) Client(ctx context.Context) (connection.SSHClient, error)
func (*DefaultSSHProvider) HasCurrent ¶
func (p *DefaultSSHProvider) HasCurrent() bool
func (*DefaultSSHProvider) NewAdditionalClient ¶
func (p *DefaultSSHProvider) NewAdditionalClient(ctx context.Context) (connection.SSHClient, error)
func (*DefaultSSHProvider) NewStandaloneClient ¶
func (p *DefaultSSHProvider) NewStandaloneClient(ctx context.Context, sess *session.Session, privateKeys []session.AgentPrivateKey, opts ...connection.StandaloneClientOpt) (connection.SSHClient, error)
func (*DefaultSSHProvider) SwitchClient ¶
func (p *DefaultSSHProvider) SwitchClient(ctx context.Context, sess *session.Session, privateKeys []session.AgentPrivateKey) (connection.SSHClient, error)
func (*DefaultSSHProvider) SwitchToDefault ¶
func (p *DefaultSSHProvider) SwitchToDefault(ctx context.Context) (connection.SSHClient, error)
func (*DefaultSSHProvider) WithID ¶
func (p *DefaultSSHProvider) WithID(id string) *DefaultSSHProvider
func (*DefaultSSHProvider) WithOptions ¶
func (p *DefaultSSHProvider) WithOptions(opts ...SSHClientOption) *DefaultSSHProvider
WithOptions warning passed options fully rewrite options passed to NewDefaultSSHProvider
type ErrorSSHProvider ¶
type ErrorSSHProvider struct {
// contains filtered or unexported fields
}
func NewErrorSSHProvider ¶
func NewErrorSSHProvider(err error) *ErrorSSHProvider
NewErrorSSHProvider Special provider that always return error for all operations expected cleanup it can be used with GetRunnerInterface if you are you sure that you do not use KubeClient over SSH
func (*ErrorSSHProvider) Client ¶
func (p *ErrorSSHProvider) Client(context.Context) (connection.SSHClient, error)
func (*ErrorSSHProvider) NewAdditionalClient ¶
func (p *ErrorSSHProvider) NewAdditionalClient(context.Context) (connection.SSHClient, error)
func (*ErrorSSHProvider) NewStandaloneClient ¶
func (p *ErrorSSHProvider) NewStandaloneClient(context.Context, *session.Session, []session.AgentPrivateKey, ...connection.StandaloneClientOpt) (connection.SSHClient, error)
func (*ErrorSSHProvider) SwitchClient ¶
func (p *ErrorSSHProvider) SwitchClient(context.Context, *session.Session, []session.AgentPrivateKey) (connection.SSHClient, error)
func (*ErrorSSHProvider) SwitchToDefault ¶
func (p *ErrorSSHProvider) SwitchToDefault(context.Context) (connection.SSHClient, error)
type FakeKubeProvider ¶
type FakeKubeProvider struct {
// contains filtered or unexported fields
}
func NewFakeKubeProvider ¶
func NewFakeKubeProvider(gvrs ...map[schema.GroupVersionResource]string) *FakeKubeProvider
func (*FakeKubeProvider) Client ¶
func (p *FakeKubeProvider) Client(context.Context) (connection.KubeClient, error)
func (*FakeKubeProvider) NewAdditionalClient ¶
func (p *FakeKubeProvider) NewAdditionalClient(ctx context.Context) (connection.KubeClient, error)
func (*FakeKubeProvider) NewAdditionalClientWithoutInitialize ¶
func (p *FakeKubeProvider) NewAdditionalClientWithoutInitialize(ctx context.Context) (connection.KubeClient, error)
type KubeProviderLoopsParams ¶
type RunnerInterface ¶
type RunnerInterface interface {
IsSwitched(ctx context.Context) (bool, error)
SetNodeInterface(ctx context.Context, client *kube.KubernetesClient, opts ...SetNodeInterfaceOpt) error
Finalize(isError bool)
InitOptions() []kube.InitOpt
}
func GetRunnerInterface ¶
func GetRunnerInterface(config *kube.Config, sett settings.Settings, sshProvider connection.SSHProvider, opts ...RunnerInterfaceOpt) (RunnerInterface, error)
type RunnerInterfaceLocal ¶
type RunnerInterfaceLocal struct {
// contains filtered or unexported fields
}
func NewRunnerInterfaceLocal ¶
func NewRunnerInterfaceLocal(sett settings.Settings) *RunnerInterfaceLocal
func (*RunnerInterfaceLocal) Finalize ¶
func (r *RunnerInterfaceLocal) Finalize(bool)
func (*RunnerInterfaceLocal) InitOptions ¶
func (r *RunnerInterfaceLocal) InitOptions() []kube.InitOpt
func (*RunnerInterfaceLocal) IsSwitched ¶
func (r *RunnerInterfaceLocal) IsSwitched(context.Context) (bool, error)
func (*RunnerInterfaceLocal) SetNodeInterface ¶
func (r *RunnerInterfaceLocal) SetNodeInterface(_ context.Context, client *kube.KubernetesClient, _ ...SetNodeInterfaceOpt) error
type RunnerInterfaceNoAction ¶
type RunnerInterfaceNoAction struct{}
func (*RunnerInterfaceNoAction) Finalize ¶
func (*RunnerInterfaceNoAction) Finalize(bool)
func (*RunnerInterfaceNoAction) InitOptions ¶
func (*RunnerInterfaceNoAction) InitOptions() []kube.InitOpt
func (*RunnerInterfaceNoAction) IsSwitched ¶
func (*RunnerInterfaceNoAction) IsSwitched(context.Context) (bool, error)
func (*RunnerInterfaceNoAction) SetNodeInterface ¶
func (*RunnerInterfaceNoAction) SetNodeInterface(context.Context, *kube.KubernetesClient, ...SetNodeInterfaceOpt) error
type RunnerInterfaceOpt ¶
type RunnerInterfaceOpt func(RunnerInterface)
func RunnerInterfaceWithInitOpts ¶
func RunnerInterfaceWithInitOpts(opts ...kube.InitOpt) RunnerInterfaceOpt
func RunnerInterfaceWithSSHLoopsParams ¶
func RunnerInterfaceWithSSHLoopsParams(p RunnerInterfaceSSHLoopsParams) RunnerInterfaceOpt
type RunnerInterfaceSSH ¶
type RunnerInterfaceSSH struct {
// contains filtered or unexported fields
}
func NewRunnerInterfaceSSH ¶
func NewRunnerInterfaceSSH(sett settings.Settings, sshProvider connection.SSHProvider) *RunnerInterfaceSSH
func (*RunnerInterfaceSSH) Finalize ¶
func (r *RunnerInterfaceSSH) Finalize(isError bool)
func (*RunnerInterfaceSSH) InitOptions ¶
func (r *RunnerInterfaceSSH) InitOptions() []kube.InitOpt
func (*RunnerInterfaceSSH) IsSwitched ¶
func (r *RunnerInterfaceSSH) IsSwitched(ctx context.Context) (bool, error)
func (*RunnerInterfaceSSH) SetNodeInterface ¶
func (r *RunnerInterfaceSSH) SetNodeInterface(ctx context.Context, client *kube.KubernetesClient, opts ...SetNodeInterfaceOpt) error
func (*RunnerInterfaceSSH) WithInitOptions ¶
func (r *RunnerInterfaceSSH) WithInitOptions(opts ...kube.InitOpt) *RunnerInterfaceSSH
func (*RunnerInterfaceSSH) WithLoopParams ¶
func (r *RunnerInterfaceSSH) WithLoopParams(p RunnerInterfaceSSHLoopsParams) *RunnerInterfaceSSH
type SSHClientOption ¶
type SSHClientOption func(options *SSHClientOptions)
func SSHClientWithForceGoSSH ¶
func SSHClientWithForceGoSSH() SSHClientOption
func SSHClientWithID ¶
func SSHClientWithID(id string) SSHClientOption
func SSHClientWithLoopsParams ¶
func SSHClientWithLoopsParams(params gossh.ClientLoopsParams) SSHClientOption
func SSHClientWithNoInitializeAgent ¶
func SSHClientWithNoInitializeAgent() SSHClientOption
func SSHClientWithStartAfterCreate ¶
func SSHClientWithStartAfterCreate(f bool) SSHClientOption
type SSHClientOptions ¶
type SetNodeInterfaceOpt ¶
type SetNodeInterfaceOpt func(opts *SetNodeInterfaceOpts)
func SetNodeInterfaceOptWithNewNodeInterface ¶
func SetNodeInterfaceOptWithNewNodeInterface() SetNodeInterfaceOpt
func SetNodeInterfaceOptWithRunChecks ¶
func SetNodeInterfaceOptWithRunChecks() SetNodeInterfaceOpt
type SetNodeInterfaceOpts ¶
Click to show internal directories.
Click to hide internal directories.