clusterfile

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClusterNotExist = fmt.Errorf("no cluster exist")
View Source
var ErrTypeNotFound = errors.New("no corresponding type structure was found")

Functions

func GetClusterFromFile

func GetClusterFromFile(filepath string) (cluster *v2.Cluster, err error)

func GetDefaultCluster

func GetDefaultCluster() (cluster *v2.Cluster, err error)

func GetDefaultClusterName

func GetDefaultClusterName() (string, error)

func SaveToDisk

func SaveToDisk(cluster *v2.Cluster, clusterName string) error

SaveToDisk save cluster obj to disk file with encrypted ssh credential

Types

type ClusterFile

type ClusterFile struct {
	Cluster    v2.Cluster
	Configs    []v1.Config
	KubeConfig *runtime.KubeadmConfig
	Plugins    []v1.Plugin
	// contains filtered or unexported fields
}

func (*ClusterFile) DecodeCluster

func (c *ClusterFile) DecodeCluster(data []byte) error

func (*ClusterFile) DecodeConfigs

func (c *ClusterFile) DecodeConfigs(data []byte) error

func (*ClusterFile) DecodeKubeadmConfig

func (c *ClusterFile) DecodeKubeadmConfig(data []byte) error

func (*ClusterFile) DecodePlugins

func (c *ClusterFile) DecodePlugins(data []byte) error

func (*ClusterFile) GetCluster

func (c *ClusterFile) GetCluster() v2.Cluster

func (*ClusterFile) GetConfigs

func (c *ClusterFile) GetConfigs() []v1.Config

func (*ClusterFile) GetKubeadmConfig

func (c *ClusterFile) GetKubeadmConfig() *runtime.KubeadmConfig

func (*ClusterFile) GetPipeLine

func (c *ClusterFile) GetPipeLine() ([]func() error, error)

func (*ClusterFile) GetPlugins

func (c *ClusterFile) GetPlugins() []v1.Plugin

func (*ClusterFile) PrePareCluster

func (c *ClusterFile) PrePareCluster() error

func (*ClusterFile) PrePareConfigs

func (c *ClusterFile) PrePareConfigs() error

func (*ClusterFile) PrePareEnv

func (c *ClusterFile) PrePareEnv() error

func (*ClusterFile) Process

func (c *ClusterFile) Process() error

type Interface

type Interface interface {
	PreProcessor
	GetCluster() v2.Cluster
	GetConfigs() []v1.Config
	GetPlugins() []v1.Plugin
	GetKubeadmConfig() *runtime.KubeadmConfig
}

func NewClusterFile

func NewClusterFile(path string) (i Interface, err error)

type PreProcessor

type PreProcessor interface {
	Process() error
}

func NewPreProcessor

func NewPreProcessor(path string) PreProcessor

Jump to

Keyboard shortcuts

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