common

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Connect connects to the host.
	Connect() error
	// Disconnect disconnects from the host.
	Disconnect() error

	// OS returns information about the operating system the host.
	OS() *v1alpha1.OSInfo
}

Client is the interface for a client.

type ClientFactory

type ClientFactory func(*v1alpha1.Connection, ...Option) (Client, error)

ClientFactory is a function that creates a new client.

type Option

type Option func(options *Options) error

Option applies a configuration option for the execution of an operation.

func WithKubernetesClient

func WithKubernetesClient(kubernetesClient client.Client) Option

WithKubernetesClient allows to provide a Kubernetes client that knows how to talk to the Kubernetes API.

type Options

type Options struct {
	KubernetesClient client.Client
}

Options contains the configuration for an operation.

func GetDefaultOptions

func GetDefaultOptions() *Options

GetDefaultOptions returns the default options for all operations of this library.

func (*Options) Apply

func (o *Options) Apply(options ...Option) (*Options, error)

Apply applies the option functions to the current set of options.

Jump to

Keyboard shortcuts

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