Documentation
¶
Index ¶
- Variables
- func ApplyDefaults(cfg *ClientConfig)
- func Debug(v ...interface{})
- func Error(v ...interface{})
- func Fatal(v ...interface{})
- func GetBaseLogger() *log.Logger
- func Info(v ...interface{})
- func SetDefaultLogger(logger *Logger)
- func Setup()
- func Warn(v ...interface{})
- type ClientConfig
- type Interface
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Cfg = NewClientConfig() LocalInterface = NewInterface() )
Functions ¶
func ApplyDefaults ¶
func ApplyDefaults(cfg *ClientConfig)
func GetBaseLogger ¶
func SetDefaultLogger ¶
func SetDefaultLogger(logger *Logger)
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(cfgs ...*ClientConfig) *Logger
func NewLogger ¶
func NewLogger(cfg *ClientConfig) *Logger
Click to show internal directories.
Click to hide internal directories.