Documentation
¶
Index ¶
- Constants
- func DefaultAPIURL() string
- func DefaultConfigPath() (string, error)
- func FlattenTransport(cfg *TransportConfig) *rstream.Transport
- func NewClientFromEnv() (*rstream.Client, error)
- func NewClientFromEnvOptions(opts ClientEnvOptions) (*rstream.Client, error)
- func NewClientFromResolved(resolved Resolved) (*rstream.Client, error)
- func TokenFromAuth(auth *Auth) (string, bool, error)
- func WriteAtomic(path string, cfg Config) error
- type Auth
- type BindConfig
- type ClientEnvOptions
- type ClientResolution
- type Config
- func (c *Config) EnsureEnvironment(apiURL string) *Environment
- func (c *Config) EnsureVersion()
- func (c *Config) FindContextByName(name string) (*Context, int, error)
- func (c *Config) FindContextByNameAndAPIURL(name, apiURL string) (*Context, int, error)
- func (c *Config) FindContextForAPIURL(name, apiURL string) (*Context, int, error)
- func (c *Config) FindContextUnlinked(name string) (*Context, int, error)
- func (c *Config) FindEnvironment(apiURL string) (*Environment, int)
- func (c *Config) Normalize()
- type Context
- type DNSConfig
- type DefaultContext
- type Defaults
- type EnvSettings
- type Environment
- type FileLock
- type ProxyConfig
- type ResolveInput
- type Resolved
- type Token
- type TokenStorage
- type TransportConfig
Constants ¶
View Source
const ( TokenStorageInline = "inline" TokenStorageKeychain = "keychain" )
Variables ¶
This section is empty.
Functions ¶
func DefaultAPIURL ¶
func DefaultAPIURL() string
func DefaultConfigPath ¶
func FlattenTransport ¶
func FlattenTransport(cfg *TransportConfig) *rstream.Transport
func NewClientFromEnv ¶
func NewClientFromEnvOptions ¶
func NewClientFromEnvOptions(opts ClientEnvOptions) (*rstream.Client, error)
func WriteAtomic ¶
Types ¶
type BindConfig ¶
type ClientEnvOptions ¶
type ClientResolution ¶
func ResolveFromEnv ¶
func ResolveFromEnv(opts ClientEnvOptions) (ClientResolution, error)
type Config ¶
type Config struct {
Version int `yaml:"version,omitempty"`
Defaults Defaults `yaml:"defaults,omitempty"`
Environments []Environment `yaml:"environments,omitempty"`
Contexts []Context `yaml:"contexts,omitempty"`
}
func (*Config) EnsureEnvironment ¶
func (c *Config) EnsureEnvironment(apiURL string) *Environment
func (*Config) EnsureVersion ¶
func (c *Config) EnsureVersion()
func (*Config) FindContextByName ¶
func (*Config) FindContextByNameAndAPIURL ¶
func (*Config) FindContextForAPIURL ¶
func (*Config) FindContextUnlinked ¶
func (*Config) FindEnvironment ¶
func (c *Config) FindEnvironment(apiURL string) (*Environment, int)
type DefaultContext ¶
type DefaultContext struct {
Name string `yaml:"name,omitempty"`
}
type Defaults ¶
type Defaults struct {
Context *DefaultContext `yaml:"context,omitempty"`
}
type EnvSettings ¶
type EnvSettings struct {
ConfigPath string
APIURL string
Context string
Engine string
Token string
}
func ReadEnv ¶
func ReadEnv() EnvSettings
type Environment ¶
type Environment struct {
APIURL string `yaml:"apiUrl"`
Auth *Auth `yaml:"auth,omitempty"`
Transport *TransportConfig `yaml:"transport,omitempty"`
}
type ProxyConfig ¶
type ResolveInput ¶
type Resolved ¶
type Resolved struct {
APIURL string
ContextName string
Environment *Environment
Context *Context
Engine string
Token string
Transport *rstream.Transport
}
func Resolve ¶
func Resolve(input ResolveInput) (Resolved, error)
type Token ¶
type Token struct {
Storage *TokenStorage `yaml:"storage,omitempty"`
}
type TokenStorage ¶
type TransportConfig ¶
type TransportConfig struct {
Bind *BindConfig `yaml:"bind,omitempty"`
IPFamily string `yaml:"ipFamily,omitempty"`
DNS *DNSConfig `yaml:"dns,omitempty"`
MPTCP *bool `yaml:"mptcp,omitempty"`
Proxy *ProxyConfig `yaml:"proxy,omitempty"`
}
func MergeTransport ¶
func MergeTransport(base, override *TransportConfig) *TransportConfig
Click to show internal directories.
Click to hide internal directories.