cluster

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ThirdPartComponentsFile        = "thirdPartComponents.yaml"
	ComponentCategoryFile          = "componentCategoryDefinition.yaml"
	ClusterCommonConfigFile        = "clusterCommonConfig.yaml"
	EnvthirdPartComponents         = "THIRD_PART_COMPONENTS"
	EnvComponentCategoryDefinition = "COMPONENT_CATEGORY_DEFINITION"
	EnvClusterCommonConfig         = "CLUSTER_COMMON_CONFIG"
	DefaultConfigPath              = "/opt/nautes/config"
)
View Source
const (
	CLUSTER_TYPE_PHYSICAL = "physical"
	CLUSTER_TYPE_VIRTUAL  = "virtual"
)
View Source
const (
	CLUSTER_USAGE_HOST   = "host"
	CLUSTER_USAGE_WORKER = "worker"
)
View Source
const (
	ClusterWorkTypeDeployment = "deployment"
	ClusterWorkTypePipeline   = "pipeline"
)

Variables

View Source
var (
	ThirdPartComponentsPath         = fmt.Sprintf("%s/%s", DefaultConfigPath, ThirdPartComponentsFile)
	ComponentCategoryDefinitionPath = fmt.Sprintf("%s/%s", DefaultConfigPath, ComponentCategoryFile)
	ClusterCommonConfigPath         = fmt.Sprintf("%s/%s", DefaultConfigPath, ClusterCommonConfigFile)
)

Functions

func DeleteValidateConfig

func DeleteValidateConfig() error

func SetClusterValidateConfig

func SetClusterValidateConfig() error

Types

type ClusterCommonConfig

type ClusterCommonConfig struct {
	Save   UsageCommonConfig
	Remove UsageCommonConfig
}

General configuration required for cluster registration.

func GetClusterCommonConfig

func GetClusterCommonConfig(path string) (*ClusterCommonConfig, error)

type ClusterComponentConfig

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

func NewClusterComponentConfig

func NewClusterComponentConfig() (*ClusterComponentConfig, error)

func (*ClusterComponentConfig) GetClusterCommonConfig

func (c *ClusterComponentConfig) GetClusterCommonConfig(operation ClusterOperation, cluster *ClusterInfo) (CommonConfig, error)

func (*ClusterComponentConfig) GetClusterComponentsDefinition

func (c *ClusterComponentConfig) GetClusterComponentsDefinition(cluster *ClusterInfo) (ComponentList, error)

func (*ClusterComponentConfig) GetDefaultThirdPartComponentByType

func (c *ClusterComponentConfig) GetDefaultThirdPartComponentByType(componentType string) (*ThridPartComponent, error)

func (*ClusterComponentConfig) GetThirdPartComponentByName

func (c *ClusterComponentConfig) GetThirdPartComponentByName(name string) (*ThridPartComponent, error)

func (*ClusterComponentConfig) GetThirdPartComponentByType

func (c *ClusterComponentConfig) GetThirdPartComponentByType(componentType string) *ThridPartComponent

type ClusterInfo

type ClusterInfo struct {
	Name        string
	Usage       string
	ClusterType string
	WorkType    string
}

type ClusterOperation

type ClusterOperation string
const (
	ToSave   ClusterOperation = "save"
	ToRemove ClusterOperation = "remove"
)

type ClusterTypeComponentDefinition

type ClusterTypeComponentDefinition struct {
	Physical WorkerTypeComponentDefinition
	Virtual  WorkerTypeComponentDefinition
}

type CommonConfig

type CommonConfig []string

type ComponentList

type ComponentList []string

type ComponentType

type ComponentType string
const (
	CertManagement      ComponentType = "certManagement"
	Deployment          ComponentType = "deployment"
	EventListener       ComponentType = "eventListener"
	Gateway             ComponentType = "gateway"
	MultiTenant         ComponentType = "multiTenant"
	Pipeline            ComponentType = "pipeline"
	ProgressiveDelivery ComponentType = "progressiveDelivery"
	SecretSync          ComponentType = "secretSync"
	OauthProxy          ComponentType = "oauthProxy"
	SecretManagement    ComponentType = "secretManagement"
)

type InstallPath

type InstallPath struct {
	HostPhysical   []string `yaml:"host&physical"`
	WorkerPhysical []string `yaml:"worker&physical"`
	WorkerVirtual  []string `yaml:"worker&virtual"`
	Generic        []string `yaml:"generic"`
}

type Propertie

type Propertie struct {
	Name         string
	Type         string
	RegexPattern string
	Required     bool
	Default      string
}

type ThridPartComponent

type ThridPartComponent struct {
	Name        string      `yaml:"name"`
	Namespace   string      `yaml:"namespace"`
	Type        string      `yaml:"type"`
	Default     bool        `yaml:"default"`
	General     bool        `yaml:"general"`
	Properties  []Propertie `yaml:"properties"`
	InstallPath InstallPath `yaml:"installPath"`
}

Configuration information of third-party components required for cluster registration.

func GetThirdPartComponentsList

func GetThirdPartComponentsList(path string) ([]*ThridPartComponent, error)

func (*ThridPartComponent) GetInstallPath

func (t *ThridPartComponent) GetInstallPath(key string) []string

type UsageCommonConfig

type UsageCommonConfig struct {
	Host   CommonConfig
	Worker WorkerTypeCommonConfig
}

type UsageComponentDefinition

type UsageComponentDefinition struct {
	Host   ComponentList
	Worker ClusterTypeComponentDefinition
}

Components required for cluster registration.

func GetComponentDefinition

func GetComponentDefinition(path string) (*UsageComponentDefinition, error)

type WorkerTypeCommonConfig

type WorkerTypeCommonConfig struct {
	Physical CommonConfig
	Virtual  CommonConfig
}

type WorkerTypeComponentDefinition

type WorkerTypeComponentDefinition struct {
	Deployment ComponentList
	Pipeline   ComponentList
}

Jump to

Keyboard shortcuts

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