Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTalosDirectory ¶
GetTalosDirectory returns path to Talos directory (~/.talos).
Types ¶
type Auth ¶
type Auth struct { Basic *Basic `yaml:"basic,omitempty"` SideroV1 *SideroV1 `yaml:"siderov1,omitempty"` }
Auth may hold credentials for an authentication method such as Basic Auth.
type Config ¶
type Config struct { Context string `yaml:"context"` Contexts map[string]*Context `yaml:"contexts"` // contains filtered or unexported fields }
Config represents the client configuration file (talosconfig).
func FromString ¶
FromString returns a config from a string.
func NewConfig ¶
func NewConfig(contextName string, endpoints []string, caCrt []byte, client *x509.PEMEncodedCertificateAndKey) *Config
NewConfig returns the client configuration file with a single context.
func Open ¶
Open reads the config and initializes a Config struct. If path is explicitly set, it will be used. If not, the default path rules will be used.
func (*Config) Merge ¶
Merge in additional contexts from another Config.
Current context is overridden from passed in config.
type Context ¶
type Context struct { DeprecatedTarget string `yaml:"target,omitempty"` // Field deprecated in favor of Endpoints Endpoints []string `yaml:"endpoints"` Nodes []string `yaml:"nodes,omitempty"` CA string `yaml:"ca,omitempty"` Crt string `yaml:"crt,omitempty"` Key string `yaml:"key,omitempty"` Auth Auth `yaml:"auth,omitempty"` Cluster string `yaml:"cluster,omitempty"` }
Context represents the set of credentials required to talk to a target.
type Path ¶
type Path struct { // Path is the filesystem path of the config. Path string // WriteAllowed is true if the path is allowed to be written. WriteAllowed bool }
Path represents a path to a configuration file.
func GetDefaultPaths ¶
GetDefaultPaths returns the list of config file paths in order of priority.