config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDefaults

func ApplyDefaults(cfg *ClientConfig)

func Debug

func Debug(v ...interface{})

func Error

func Error(v ...interface{})

func Fatal

func Fatal(v ...interface{})

func GetBaseLogger

func GetBaseLogger() *log.Logger

func Info

func Info(v ...interface{})

func SetDefaultLogger

func SetDefaultLogger(logger *Logger)

func Setup

func Setup(cfg *ClientConfig)

func Warn

func Warn(v ...interface{})

Types

type ClientConfig

type ClientConfig struct {
	LogLevel           string `json:"log_level"`
	LogPath            string `json:"log_path"`
	DebugLogPath       string `json:"debug_log_path"`
	RPCAddr            string `json:"rpc_addr"`
	InsecureSkipVerify bool   `json:"skip_verify"`
	CiscoCompat        bool   `json:"cisco_compat"`
	NoDTLS             bool   `json:"no_dtls"`
	AgentName          string `json:"agent_name"`
	AgentVersion       string `json:"agent_version"`
	BaseMTU            int    `json:"base_mtu"`

	SplitRoutes []string `json:"split_routes"`
	DNSDomains  []string `json:"dns_domains"`

	ServerCertPin string `json:"server_cert"`
}

func NewClientConfig

func NewClientConfig() *ClientConfig

type Interface

type Interface struct {
	Name    string `json:"name"`
	Ip4     string `json:"ip4"`
	Mac     string `json:"mac"`
	Gateway string `json:"gateway"`
}

func NewInterface

func NewInterface() *Interface

type Logger

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

func InitLog

func InitLog(cfg *ClientConfig) *Logger

func NewLogger

func NewLogger(cfg *ClientConfig) *Logger

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(v ...interface{})

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

func (*Logger) StdLogger

func (l *Logger) StdLogger() *log.Logger

func (*Logger) Warn

func (l *Logger) Warn(v ...interface{})

Jump to

Keyboard shortcuts

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