Documentation
¶
Overview ¶
Package config 配置模块,由程序入口加载,全局可用
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Datatunnel ¶
type Options ¶
type Options struct {
Debug bool `json:"debug" yaml:"debug"`
SmartCloud SmartCloud `json:"smartcloud" yaml:"smartcloud"`
SmartAssistant SmartAssistant `json:"smartassistant" yaml:"smartassistant"`
Docker Docker `json:"docker" yaml:"docker"`
Datatunnel Datatunnel `json:"datatunnel" yaml:"datatunnel"`
}
func InitConfig ¶
type SmartAssistant ¶
type SmartAssistant struct {
ID string `json:"id" yaml:"id"`
Key string `json:"key" yaml:"key"`
Db string `json:"db" yaml:"db"`
Host string `json:"host" yaml:"host"`
Port int `json:"port" yaml:"port"`
GRPCPort int `json:"grpc_port" yaml:"grpc_port"`
FluentdAddress string `json:"fluentd_address" yaml:"fluentd_address"`
Database Database `json:"database" yaml:"database"`
// HostDataPath 宿主机runtime目录
HostRuntimePath string `json:"host_runtime_path" yaml:"host_runtime_path"`
RuntimePath string `json:"runtime_path" yaml:"runtime_path"`
// Deprecated: HostIP 插件取消host模式后删除
HostIP string `json:"host_ip" yaml:"host_ip"`
}
func (SmartAssistant) BackupPath ¶
func (sa SmartAssistant) BackupPath() string
func (SmartAssistant) DataPath ¶
func (sa SmartAssistant) DataPath() string
func (SmartAssistant) GRPCAddress ¶
func (sa SmartAssistant) GRPCAddress() string
func (SmartAssistant) HttpAddress ¶
func (sa SmartAssistant) HttpAddress() string
type SmartCloud ¶
type SmartCloud struct {
Domain string `json:"domain" yaml:"domain"`
TLS bool `json:"tls" yaml:"tls"`
GRPCPort int `json:"grpc_port" yaml:"grpc_port"`
DataCenterID int `json:"data_center_id"`
WorkerID int `json:"worker_id"`
}
func (SmartCloud) URL ¶
func (sc SmartCloud) URL() string
func (SmartCloud) WebsocketURL ¶
func (sc SmartCloud) WebsocketURL() string
Click to show internal directories.
Click to hide internal directories.