clusterfile

package
v1.14.1-0...-7f8ff72 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CRDForBytes

func CRDForBytes(data []byte, kind string) (out interface{}, err error)

func Cluster

func Cluster(filepath string) (clusters []v1beta1.Cluster, err error)

func Configs

func Configs(filepath string) (configs []v1beta1.Config, err error)

func GetClusterFromDataCompatV1

func GetClusterFromDataCompatV1(data []byte) (*v2.Cluster, error)

func GetClusterFromFile

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

func GetClusterFromName

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

func GetDefaultClusterName

func GetDefaultClusterName() (string, error)

Types

type ClusterFile

type ClusterFile struct {
	// 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) DecodeRuntimeConfig

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

func (*ClusterFile) GetCluster

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

func (*ClusterFile) GetConfigs

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

func (*ClusterFile) GetRuntimeConfig

func (c *ClusterFile) GetRuntimeConfig() runtime.Config

func (*ClusterFile) Process

func (c *ClusterFile) Process() (err error)

type Interface

type Interface interface {
	PreProcessor
	GetCluster() *v2.Cluster
	GetConfigs() []v2.Config
	GetRuntimeConfig() runtime.Config
}

func NewClusterFile

func NewClusterFile(path string, opts ...OptionFunc) Interface

type OptionFunc

type OptionFunc func(*ClusterFile)

func WithCustomConfigFiles

func WithCustomConfigFiles(files []string) OptionFunc

func WithCustomEnvs

func WithCustomEnvs(envs []string) OptionFunc

func WithCustomRuntimeConfigFiles

func WithCustomRuntimeConfigFiles(files []string) OptionFunc

func WithCustomSets

func WithCustomSets(sets []string) OptionFunc

func WithCustomValues

func WithCustomValues(valueFiles []string) OptionFunc

type PreProcessor

type PreProcessor interface {
	Process() error
}

Jump to

Keyboard shortcuts

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