Documentation
¶
Index ¶
- func Dir() string
- type Config
- func (c *Config) ClearClusterNodes(clusterName string) error
- func (c *Config) CurrentClusterName() string
- func (c *Config) CurrentConfig() (*Config, bool)
- func (c *Config) CurrentNodeName() string
- func (c *Config) DeleteClusterNode(clusterName, nodeName string) error
- func (c *Config) GetClusterNodeConfig(clusterName, nodeName string) (*Config, bool)
- func (c *Config) GetNodeConfig(node string) (*Config, bool)
- func (c *Config) IsLegacyConfig() bool
- func (c *Config) ListClusterNodes(clusterName string) ([]string, error)
- func (c *Config) ListClusters() ([]string, error)
- func (c *Config) SetClusterMetadata(clusterName, subscriptionID, resourceGroup string) error
- func (c *Config) SetClusterNodeConfigWithVMSSInfo(...) error
- func (c *Config) SetNodeConfigWithNodeFlag(nodeName, nodeFlag string) error
- func (c *Config) SetNodeConfigWithResourceIDFlag(nodeName, resourceIDFlag string) error
- func (c *Config) SetNodeConfigWithVMSSInfoFlag(...) error
- func (c *Config) ShowConfig() error
- func (c *Config) UnsetAllConfig() error
- func (c *Config) UnsetClusterConfig(clusterName string) error
- func (c *Config) UnsetCurrentClusterConfig() error
- func (c *Config) UnsetCurrentNodeConfig() error
- func (c *Config) UnsetNodeConfig(targetNode string) error
- func (c *Config) UseClusterConfig(clusterName string) error
- func (c *Config) UseNodeConfig(targetNode string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.3.0
func (*Config) ClearClusterNodes ¶ added in v0.3.0
ClearClusterNodes removes all nodes under a cluster while keeping the cluster metadata intact. This is used during import to sync the node list.
func (*Config) CurrentClusterName ¶ added in v0.3.0
CurrentClusterName returns the current cluster name, or "" if none is set.
func (*Config) CurrentConfig ¶ added in v0.3.0
CurrentConfig returns the current node configuration if it exists. It first checks cluster-aware config, then falls back to legacy.
func (*Config) CurrentNodeName ¶ added in v0.3.0
CurrentNodeName returns the current node name from the configuration, if set.
func (*Config) DeleteClusterNode ¶ added in v0.3.0
DeleteClusterNode removes a single node from a cluster.
func (*Config) GetClusterNodeConfig ¶ added in v0.3.0
GetClusterNodeConfig returns the viper sub-tree for a node within a cluster.
func (*Config) GetNodeConfig ¶ added in v0.3.0
GetNodeConfig returns the configuration for the given node if it exists. It searches cluster-aware config first, then legacy.
func (*Config) IsLegacyConfig ¶ added in v0.3.0
IsLegacyConfig returns true if the config uses the old format (top-level "nodes" without "clusters"). Callers should warn the user to re-import.
func (*Config) ListClusterNodes ¶ added in v0.3.0
ListClusterNodes returns all node names belonging to a cluster.
func (*Config) ListClusters ¶ added in v0.3.0
ListClusters returns the names of all clusters in the configuration.
func (*Config) SetClusterMetadata ¶ added in v0.3.0
SetClusterMetadata stores the cluster-level metadata (subscription, resource-group, cluster-name) under clusters.<clusterName>.
func (*Config) SetClusterNodeConfigWithVMSSInfo ¶ added in v0.3.0
func (c *Config) SetClusterNodeConfigWithVMSSInfo(clusterName, nodeName, subscriptionID, nodeResourceGroup, vmssName, instanceID string) error
SetClusterNodeConfigWithVMSSInfo stores a node under a specific cluster.
func (*Config) SetNodeConfigWithNodeFlag ¶ added in v0.3.0
SetNodeConfigWithNodeFlag sets the node configuration with based on node flag
func (*Config) SetNodeConfigWithResourceIDFlag ¶ added in v0.3.0
SetNodeConfigWithResourceIDFlag sets the node configuration with based on resource ID flag
func (*Config) SetNodeConfigWithVMSSInfoFlag ¶ added in v0.3.0
func (c *Config) SetNodeConfigWithVMSSInfoFlag(nodeName, subscriptionIDFlag, nodeResourceGroupFlag, vmssFlag, instanceIDFlag string) error
SetNodeConfigWithVMSSInfoFlag sets the node configuration with vmss info flags
func (*Config) ShowConfig ¶ added in v0.3.0
ShowConfig prints the configuration to stdout
func (*Config) UnsetAllConfig ¶ added in v0.3.0
UnsetAllConfig removes all the configuration
func (*Config) UnsetClusterConfig ¶ added in v0.3.0
UnsetClusterConfig removes an entire cluster and its nodes from the config.
func (*Config) UnsetCurrentClusterConfig ¶ added in v0.3.0
UnsetCurrentClusterConfig removes the current-cluster selection.
func (*Config) UnsetCurrentNodeConfig ¶ added in v0.3.0
UnsetCurrentNodeConfig removes the current node from the configuration
func (*Config) UnsetNodeConfig ¶ added in v0.3.0
UnsetNodeConfig removes the node configuration
func (*Config) UseClusterConfig ¶ added in v0.3.0
UseClusterConfig sets the current cluster in the configuration.
func (*Config) UseNodeConfig ¶ added in v0.3.0
UseNodeConfig sets the current node to use in the configuration. It searches across all clusters for the node.