lib

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Package lib is a generated GoMock package.

Package lib is a generated GoMock package.

Package lib is a generated GoMock package.

Index

Constants

View Source
const (
	Podman = "podman"
	Docker = "docker"
)

Variables

This section is empty.

Functions

func GetMinikubeIso

func GetMinikubeIso() string

Types

type Cluster

type Cluster interface {
	Provision(cc *config.ClusterConfig, n *config.Node, apiServer bool, delOnFail bool) (command.Runner, bool, libmachine.API, *host.Host, error)
	Start(starter node.Starter, apiServer bool) (*kubeconfig.Settings, error)
	Delete(cc config.ClusterConfig, name string) (*config.Node, error)
	Get(name string) *config.ClusterConfig
	Add(cc *config.ClusterConfig, starter node.Starter) error
	SetAddon(name string, addon string, value string) error
}

type ClusterClient

type ClusterClient interface {
	SetConfig(args MinikubeClientConfig)
	GetConfig() MinikubeClientConfig
	SetDependencies(dep MinikubeClientDeps)
	Start() (*kubeconfig.Settings, error)
	Delete() error
	GetClusterConfig() *config.ClusterConfig
	GetK8sVersion() string
	ApplyAddons(addons []string) error
	GetAddons() []string
}

type Downloader

type Downloader interface {
	ISO(urls []string, skipChecksum bool) (string, error)
	PreloadTarball(k8sVersion, containerRuntime, driver string) error
}

type MinikubeClient

type MinikubeClient struct {

	// TfCreationLock is a mutex used to prevent multiple minikube clients from conflicting on Start().
	// Only set this if you're using MinikubeClient in a concurrent context
	TfCreationLock *sync.Mutex
	K8sVersion     string
	// contains filtered or unexported fields
}

func NewMinikubeClient

func NewMinikubeClient(args MinikubeClientConfig, dep MinikubeClientDeps) *MinikubeClient

NewMinikubeClient creates a new MinikubeClient struct

func (*MinikubeClient) ApplyAddons

func (e *MinikubeClient) ApplyAddons(addons []string) error

func (*MinikubeClient) Delete

func (e *MinikubeClient) Delete() error

Delete deletes the given cluster associated with the cluster config

func (*MinikubeClient) GetAddons

func (e *MinikubeClient) GetAddons() []string

func (*MinikubeClient) GetClusterConfig

func (e *MinikubeClient) GetClusterConfig() *config.ClusterConfig

GetClusterConfig retrieves the latest cluster config from minikube

func (*MinikubeClient) GetConfig

func (e *MinikubeClient) GetConfig() MinikubeClientConfig

GetConfig retrieves the current clients configuration

func (*MinikubeClient) GetK8sVersion

func (e *MinikubeClient) GetK8sVersion() string

func (*MinikubeClient) SetConfig

func (e *MinikubeClient) SetConfig(args MinikubeClientConfig)

SetConfig sets the clients configuration

func (*MinikubeClient) SetDependencies

func (e *MinikubeClient) SetDependencies(dep MinikubeClientDeps)

SetDependencies injects dependencies into the MinikubeClient

func (*MinikubeClient) Start

func (e *MinikubeClient) Start() (*kubeconfig.Settings, error)

Start starts the minikube creation process. If the cluster already exists, it will attempt to reuse it

type MinikubeClientConfig

type MinikubeClientConfig struct {
	ClusterConfig   config.ClusterConfig
	ClusterName     string
	Addons          []string
	IsoUrls         []string
	DeleteOnFailure bool
	Nodes           int
	NativeSsh       bool
}

type MinikubeClientDeps

type MinikubeClientDeps struct {
	Node       Cluster
	Downloader Downloader
}

type MinikubeCluster

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

func NewMinikubeCluster

func NewMinikubeCluster() *MinikubeCluster

func (*MinikubeCluster) Add

func (m *MinikubeCluster) Add(cc *config.ClusterConfig, starter node.Starter) error

Add adds nodes to the clusters node pool

func (*MinikubeCluster) Delete

func (m *MinikubeCluster) Delete(cc config.ClusterConfig, name string) (*config.Node, error)

func (*MinikubeCluster) Get

func (*MinikubeCluster) Provision

func (m *MinikubeCluster) Provision(cc *config.ClusterConfig, n *config.Node, apiServer bool, delOnFail bool) (command.Runner, bool, libmachine.API, *host.Host, error)

func (*MinikubeCluster) SetAddon

func (m *MinikubeCluster) SetAddon(name string, addon string, value string) error

func (*MinikubeCluster) Start

func (m *MinikubeCluster) Start(starter node.Starter, apiServer bool) (*kubeconfig.Settings, error)

type MinikubeDownloader

type MinikubeDownloader struct {
}

func NewMinikubeDownloader

func NewMinikubeDownloader() *MinikubeDownloader

func (*MinikubeDownloader) ISO

func (m *MinikubeDownloader) ISO(urls []string, skipChecksum bool) (string, error)

func (*MinikubeDownloader) PreloadTarball

func (m *MinikubeDownloader) PreloadTarball(k8sVersion, containerRuntime, driver string) error

type MockCluster

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

MockCluster is a mock of Cluster interface.

func NewMockCluster

func NewMockCluster(ctrl *gomock.Controller) *MockCluster

NewMockCluster creates a new mock instance.

func (*MockCluster) Add

func (m *MockCluster) Add(cc *config.ClusterConfig, starter node.Starter) error

Add mocks base method.

func (*MockCluster) Delete

func (m *MockCluster) Delete(cc config.ClusterConfig, name string) (*config.Node, error)

Delete mocks base method.

func (*MockCluster) EXPECT

func (m *MockCluster) EXPECT() *MockClusterMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCluster) Get

func (m *MockCluster) Get(name string) *config.ClusterConfig

Get mocks base method.

func (*MockCluster) Provision

func (m *MockCluster) Provision(cc *config.ClusterConfig, n *config.Node, apiServer, delOnFail bool) (command.Runner, bool, libmachine.API, *host.Host, error)

Provision mocks base method.

func (*MockCluster) SetAddon

func (m *MockCluster) SetAddon(name, addon, value string) error

SetAddon mocks base method.

func (*MockCluster) Start

func (m *MockCluster) Start(starter node.Starter, apiServer bool) (*kubeconfig.Settings, error)

Start mocks base method.

type MockClusterClient

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

MockClusterClient is a mock of ClusterClient interface.

func NewMockClusterClient

func NewMockClusterClient(ctrl *gomock.Controller) *MockClusterClient

NewMockClusterClient creates a new mock instance.

func (*MockClusterClient) ApplyAddons

func (m *MockClusterClient) ApplyAddons(addons []string) error

ApplyAddons mocks base method.

func (*MockClusterClient) Delete

func (m *MockClusterClient) Delete() error

Delete mocks base method.

func (*MockClusterClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClusterClient) GetAddons

func (m *MockClusterClient) GetAddons() []string

GetAddons mocks base method.

func (*MockClusterClient) GetClusterConfig

func (m *MockClusterClient) GetClusterConfig() *config.ClusterConfig

GetClusterConfig mocks base method.

func (*MockClusterClient) GetConfig

func (m *MockClusterClient) GetConfig() MinikubeClientConfig

GetConfig mocks base method.

func (*MockClusterClient) GetK8sVersion

func (m *MockClusterClient) GetK8sVersion() string

GetK8sVersion mocks base method.

func (*MockClusterClient) SetConfig

func (m *MockClusterClient) SetConfig(args MinikubeClientConfig)

SetConfig mocks base method.

func (*MockClusterClient) SetDependencies

func (m *MockClusterClient) SetDependencies(dep MinikubeClientDeps)

SetDependencies mocks base method.

func (*MockClusterClient) Start

func (m *MockClusterClient) Start() (*kubeconfig.Settings, error)

Start mocks base method.

type MockClusterClientMockRecorder

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

MockClusterClientMockRecorder is the mock recorder for MockClusterClient.

func (*MockClusterClientMockRecorder) ApplyAddons

func (mr *MockClusterClientMockRecorder) ApplyAddons(addons interface{}) *gomock.Call

ApplyAddons indicates an expected call of ApplyAddons.

func (*MockClusterClientMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockClusterClientMockRecorder) GetAddons

func (mr *MockClusterClientMockRecorder) GetAddons() *gomock.Call

GetAddons indicates an expected call of GetAddons.

func (*MockClusterClientMockRecorder) GetClusterConfig

func (mr *MockClusterClientMockRecorder) GetClusterConfig() *gomock.Call

GetClusterConfig indicates an expected call of GetClusterConfig.

func (*MockClusterClientMockRecorder) GetConfig

func (mr *MockClusterClientMockRecorder) GetConfig() *gomock.Call

GetConfig indicates an expected call of GetConfig.

func (*MockClusterClientMockRecorder) GetK8sVersion

func (mr *MockClusterClientMockRecorder) GetK8sVersion() *gomock.Call

GetK8sVersion indicates an expected call of GetK8sVersion.

func (*MockClusterClientMockRecorder) SetConfig

func (mr *MockClusterClientMockRecorder) SetConfig(args interface{}) *gomock.Call

SetConfig indicates an expected call of SetConfig.

func (*MockClusterClientMockRecorder) SetDependencies

func (mr *MockClusterClientMockRecorder) SetDependencies(dep interface{}) *gomock.Call

SetDependencies indicates an expected call of SetDependencies.

func (*MockClusterClientMockRecorder) Start

Start indicates an expected call of Start.

type MockClusterMockRecorder

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

MockClusterMockRecorder is the mock recorder for MockCluster.

func (*MockClusterMockRecorder) Add

func (mr *MockClusterMockRecorder) Add(cc, starter interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockClusterMockRecorder) Delete

func (mr *MockClusterMockRecorder) Delete(cc, name interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockClusterMockRecorder) Get

func (mr *MockClusterMockRecorder) Get(name interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockClusterMockRecorder) Provision

func (mr *MockClusterMockRecorder) Provision(cc, n, apiServer, delOnFail interface{}) *gomock.Call

Provision indicates an expected call of Provision.

func (*MockClusterMockRecorder) SetAddon

func (mr *MockClusterMockRecorder) SetAddon(name, addon, value interface{}) *gomock.Call

SetAddon indicates an expected call of SetAddon.

func (*MockClusterMockRecorder) Start

func (mr *MockClusterMockRecorder) Start(starter, apiServer interface{}) *gomock.Call

Start indicates an expected call of Start.

type MockDownloader

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

MockDownloader is a mock of Downloader interface.

func NewMockDownloader

func NewMockDownloader(ctrl *gomock.Controller) *MockDownloader

NewMockDownloader creates a new mock instance.

func (*MockDownloader) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDownloader) ISO

func (m *MockDownloader) ISO(urls []string, skipChecksum bool) (string, error)

ISO mocks base method.

func (*MockDownloader) PreloadTarball

func (m *MockDownloader) PreloadTarball(k8sVersion, containerRuntime, driver string) error

PreloadTarball mocks base method.

type MockDownloaderMockRecorder

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

MockDownloaderMockRecorder is the mock recorder for MockDownloader.

func (*MockDownloaderMockRecorder) ISO

func (mr *MockDownloaderMockRecorder) ISO(urls, skipChecksum interface{}) *gomock.Call

ISO indicates an expected call of ISO.

func (*MockDownloaderMockRecorder) PreloadTarball

func (mr *MockDownloaderMockRecorder) PreloadTarball(k8sVersion, containerRuntime, driver interface{}) *gomock.Call

PreloadTarball indicates an expected call of PreloadTarball.

Jump to

Keyboard shortcuts

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