config

package
v0.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultLogFile         = "/tmp/nx-daemon.log"
	DefaultConfigPath      = "netmux.yaml"
	DefaultIface           = "lo"
	DefaultTokensVaultPath = "/etc/netmux-tokens.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address   string    `json:"address"   yaml:"address,omitempty"`
	Network   string    `json:"network"   yaml:"network"`
	User      string    `json:"-"         yaml:"user,omitempty"`
	Cert      string    `json:"cert"      yaml:"cert,omitempty"`
	Key       string    `json:"key"       yaml:"key,omitempty"`
	IFace     string    `json:"iface"     yaml:"iface,omitempty"`
	LogLevel  string    `json:"logLevel"  yaml:"logLevel,omitempty"`
	LogFormat string    `json:"logFormat" yaml:"logFormat,omitempty"`
	Endpoints Endpoints `json:"endpoints" yaml:"endpoints,omitempty"`
}

Config represents the agent central userconfig file.

func Load

func Load() (*Config, error)

func New

func New() *Config

func (*Config) ContextByName

func (t *Config) ContextByName(n string) Endpoint

type Endpoint

type Endpoint struct {
	Name       string                       `yaml:"name"`
	Endpoint   string                       `yaml:"endpoint"`
	Kubernetes portforwarder.KubernetesInfo `yaml:"kubernetes"`
}

type Endpoints

type Endpoints []Endpoint

func (Endpoints) FindByName

func (e Endpoints) FindByName(name string) (Endpoint, bool)

Jump to

Keyboard shortcuts

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