local

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type CustomLogger

type CustomLogger struct {
	Logger resources.LoggerFactory
}

func (CustomLogger) Enable

func (l CustomLogger) Enable(flag bool)

func (CustomLogger) Enabled

func (l CustomLogger) Enabled() bool

func (CustomLogger) Error

func (l CustomLogger) Error(message string)

func (CustomLogger) Errorf

func (l CustomLogger) Errorf(format string, args ...interface{})

func (CustomLogger) Info

func (l CustomLogger) Info(message string)

func (CustomLogger) Infof

func (l CustomLogger) Infof(format string, args ...any)

func (CustomLogger) V

func (l CustomLogger) V(level klog.Level) klog.InfoLogger

func (CustomLogger) Warn

func (l CustomLogger) Warn(message string)

func (CustomLogger) Warnf

func (l CustomLogger) Warnf(format string, args ...interface{})

func (CustomLogger) WithValues

func (l CustomLogger) WithValues(keysAndValues ...interface{}) klog.Logger

type LocalGo

type LocalGo interface {
	NewProvider(log resources.LoggerFactory, storage resources.StorageFactory, options ...cluster.ProviderOption)
	Create(name string, config cluster.CreateOption, image string, wait time.Duration, explictPath func() string) error
	Delete(name string, explicitKubeconfigPath string) error
}

func ProvideClient

func ProvideClient() LocalGo

func ProvideMockClient

func ProvideMockClient() LocalGo

type LocalGoClient

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

func (*LocalGoClient) Create

func (l *LocalGoClient) Create(name string, config cluster.CreateOption, image string, wait time.Duration, explictPath func() string) error

func (*LocalGoClient) Delete

func (l *LocalGoClient) Delete(name string, explicitKubeconfigPath string) error

func (*LocalGoClient) NewProvider

type LocalGoMockClient

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

func (*LocalGoMockClient) Create

func (l *LocalGoMockClient) Create(name string, config cluster.CreateOption, image string, wait time.Duration, explictPath func() string) error

func (*LocalGoMockClient) Delete

func (l *LocalGoMockClient) Delete(name string, explicitKubeconfigPath string) error

func (*LocalGoMockClient) NewProvider

func (l *LocalGoMockClient) NewProvider(log resources.LoggerFactory, storage resources.StorageFactory, options ...cluster.ProviderOption)

type LocalProvider

type LocalProvider struct {
	ClusterName string `json:"cluster_name"`
	NoNodes     int    `json:"no_nodes"`
	Region      string
	Metadata
	// contains filtered or unexported fields
}

func ReturnLocalStruct

func ReturnLocalStruct(metadata resources.Metadata, state *types.StorageDocument, ClientOption func() LocalGo) (*LocalProvider, error)

func (*LocalProvider) Application

func (cloud *LocalProvider) Application(s string) (externalApps bool)

func (*LocalProvider) CNI

func (client *LocalProvider) CNI(s string) (externalCNI bool)

func (*LocalProvider) CreateUploadSSHKeyPair

func (*LocalProvider) CreateUploadSSHKeyPair(state resources.StorageFactory) error

CreateUploadSSHKeyPair implements resources.CloudFactory.

func (*LocalProvider) DelFirewall

func (*LocalProvider) DelFirewall(state resources.StorageFactory) error

DelFirewall implements resources.CloudFactory.

func (*LocalProvider) DelManagedCluster

func (cloud *LocalProvider) DelManagedCluster(storage resources.StorageFactory) error

DelManagedCluster implements resources.CloudFactory.

func (*LocalProvider) DelNetwork

func (*LocalProvider) DelNetwork(state resources.StorageFactory) error

DelNetwork implements resources.CloudFactory.

func (*LocalProvider) DelSSHKeyPair

func (*LocalProvider) DelSSHKeyPair(state resources.StorageFactory) error

DelSSHKeyPair implements resources.CloudFactory.

func (*LocalProvider) DelVM

DelVM implements resources.CloudFactory.

func (*LocalProvider) GetHostNameAllWorkerNode

func (*LocalProvider) GetHostNameAllWorkerNode() []string

func (*LocalProvider) GetSecretTokens

func (*LocalProvider) GetSecretTokens(resources.StorageFactory) (map[string][]byte, error)

GetSecretTokens implements resources.CloudFactory.

func (*LocalProvider) GetStateFile

GetStateFile implements resources.CloudFactory.

func (*LocalProvider) GetStateForHACluster

func (*LocalProvider) GetStateForHACluster(state resources.StorageFactory) (cloud.CloudResourceState, error)

GetStateForHACluster implements resources.CloudFactory.

func (*LocalProvider) InitState

func (cloud *LocalProvider) InitState(storage resources.StorageFactory, operation consts.KsctlOperation) error

InitState implements resources.CloudFactory.

func (*LocalProvider) IsPresent

func (obj *LocalProvider) IsPresent(storage resources.StorageFactory) error

func (*LocalProvider) Name

func (cloud *LocalProvider) Name(resName string) resources.CloudFactory

it will contain the name of the resource to be created

func (*LocalProvider) NewFirewall

func (*LocalProvider) NewFirewall(state resources.StorageFactory) error

NewFirewall implements resources.CloudFactory.

func (*LocalProvider) NewManagedCluster

func (cloud *LocalProvider) NewManagedCluster(storage resources.StorageFactory, noOfNodes int) error

NewManagedCluster implements resources.CloudFactory.

func (*LocalProvider) NewNetwork

func (*LocalProvider) NewNetwork(state resources.StorageFactory) error

NewNetwork implements resources.CloudFactory.

func (*LocalProvider) NewVM

NewVM implements resources.CloudFactory.

func (*LocalProvider) NoOfControlPlane

func (cloud *LocalProvider) NoOfControlPlane(int, bool) (int, error)

NoOfControlPlane implements resources.CloudFactory.

func (*LocalProvider) NoOfDataStore

func (cloud *LocalProvider) NoOfDataStore(int, bool) (int, error)

NoOfDataStore implements resources.CloudFactory.

func (*LocalProvider) NoOfWorkerPlane

func (cloud *LocalProvider) NoOfWorkerPlane(resources.StorageFactory, int, bool) (int, error)

NoOfWorkerPlane implements resources.CloudFactory.

func (*LocalProvider) Role

it will contain whether the resource to be created belongs for controlplane component or loadbalancer...

func (*LocalProvider) VMType

func (cloud *LocalProvider) VMType(string) resources.CloudFactory

it will contain which vmType to create

func (*LocalProvider) Version

func (cloud *LocalProvider) Version(ver string) resources.CloudFactory

Version implements resources.CloudFactory.

func (*LocalProvider) Visibility

func (cloud *LocalProvider) Visibility(bool) resources.CloudFactory

whether to have the resource as public or private (i.e. VMs)

type Metadata

type Metadata struct {
	ResName string
	Version string

	Cni string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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