Documentation
¶
Index ¶
- type AgentConfigStatus
- type AppConfiguration
- type ConfKey
- type ConfNode
- type ConfReport
- type ConfValue
- type ContentNode
- type DubboInfo
- type MetaData
- type Metadata
- type NginxConfExt
- type ProcessStatus
- type Program
- type ProgramExt
- type RegInfo
- type RegNode
- type Resource
- type Result
- type ServiceConf
- type ServiceNode
- type ServiceNodeConfiguration
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentConfigStatus ¶
type AgentConfigStatus struct {
Hostname string `json:"hostname"`
IP string `json:"ip"`
AppName string `json:"app_name"`
Env string `json:"env"`
Directory string `json:"directory"`
Environment string `json:"environment"`
Command string `json:"command"`
User string `json:"user"`
Autostart string `json:"autostart"`
Autorestart string `json:"autorestart"`
Startsecs string `json:"startsecs"`
StdoutLogfile string `json:"stdout_logfile"`
StdoutLogfileMaxbytes string `json:"stdout_logfile_maxbytes"`
StdoutLogfileBackups string `json:"stdout_logfile_backups"`
StdoutCaptureMaxbytes string `json:"stdout_capture_maxbytes"`
StderrLogfile string `json:"stderr_logfile"`
StderrLogfileMaxbytes string `json:"stderr_logfile_maxbytes"`
StderrLogfileBackups string `json:"stderr_logfile_backups"`
Stopsignal string `json:"stopsignal"`
}
AgentConfigStatus ...
type AppConfiguration ¶
type AppConfiguration struct {
Content string `json:"content"`
Resources []Resource `json:"resources"`
Metadata Metadata `json:"metadata"`
}
AppConfiguration ...
type ConfKey ¶
type ConfKey struct {
Prefix string `json:"prefix"`
Hostname string `json:"hostname"`
AppName string `json:"app_name"`
EnvName string `json:"env_name"`
Rest string `json:"rest"`
FileName string `json:"file_name"`
Port string `json:"port"`
}
ConfKey 存储配置的key字段 for instance
func ParserConfKey ¶
ParserConfKey parse conf key
type ConfNode ¶
type ConfNode struct {
AppName string `json:"appName" toml:"appName"` // 应用名称
AppEnvi string `json:"appEnvi" toml:"appEnvi"` // 应用部署环境
IP string `json:"ip" toml:"ip"` // 应用部署机器ip
Port string `json:"port" toml:"port"` // 应用部署机器port
FileName string `json:"file_name" toml:"file_name"` // 应用部署配置文件名称
Configuration *AppConfiguration `json:"configuration" toml:"configuration"` // 应用部署配置具体信息
}
ConfNode confuNode 主要代表部署在应用机器上的应用的具体配置信息
type ConfReport ¶
type ConfReport struct {
FileName string `json:"file_name"`
MD5 string `json:"md5"`
Hostname string `json:"hostname"`
Env string `json:"env"`
Timestamp int64 `json:"timestamp"`
IP string `json:"ip"`
HealthPort string `json:"health_port"`
}
ConfReport {"file_name":"config-live.toml","md5":"0f07572ba1212a75d8b5a0167c5507c2","hostname":"xxx.live.unp","env":"live","timestamp":1560477493}
type ConfValue ¶
ConfValue {"content":"","metadata":{"timestamp":1560354378,"version":"v1","format":"toml"}}
func ParserConfValue ¶
ParserConfValue ...
type ContentNode ¶
type ContentNode struct {
Content string `json:"content"` // 应用部署配置内容
Version int64 `json:"version"` // 应用部署配置版本
}
ContentNode ...
type DubboInfo ¶
type DubboInfo struct {
Namespace string `json:"namespace" toml:"namespace"`
Name string `json:"name" toml:"name"`
Labels map[string]string `json:"labels" toml:"labels"`
Methods []string `json:"methods" toml:"methods"`
}
DubboInfo ...
type MetaData ¶
type MetaData struct {
Timestamp int64 `json:"timestamp"`
Version string `json:"version"`
Format string `json:"format"`
Paths []string `json:"paths"`
}
MetaData ...
type Metadata ¶
type Metadata struct {
Format string `json:"format"` // Content encoding format: toml/yaml/json
Timestamp int64 `json:"timestamp"` //
Version string `json:"version"`
FileName string `json:"file_name"` // fileName: config-live/config-trunk
Encoded bool `json:"encoded"` // content :Whether the encryption
AppName string `json:"app_name" toml:"app_name" `
}
Metadata ...
type NginxConfExt ¶
type NginxConfExt struct {
Name string `json:"name"`
Status string `json:"status"`
Block parser.NginxConfigureBlock `json:"block"`
}
type ProcessStatus ¶
type ProcessStatus struct {
User string `json:"user"`
PID string `json:"pid"`
CPU string `json:"cpu"`
MEM string `json:"mem"`
VSZ string `json:"vsz"`
RSS string `json:"rss"`
TTY string `json:"tty"`
Stat string `json:"stat"`
Start string `json:"start"`
Time string `json:"time"`
Command string `json:"command"`
}
ProcessStatus ...
type Program ¶
type Program struct {
PID string `json:"pid" toml:"pid" `
State string `json:"state" toml:"state" `
Time string `json:"time" toml:"time" `
Name string `json:"app_name" toml:"app_name" `
Path []string `json:"path" toml:"path" `
Args []string `json:"args" toml:"args" `
}
Program ...
type ProgramExt ¶
type ProgramExt struct {
Status string `json:"status" toml:"status"`
FileName string `json:"file_name" toml:"file_name"` // profile name
FilePath string `json:"file_path" toml:"file_path"` // profile path
Manager string `json:"manager" toml:"manager"` // systemd|supervisor
ProgramName string `json:"program" toml:"program"` // programName eg: xxx
StartCommand string `json:"start_command" toml:"start_command"`
Environments []string `json:"environments" toml:"environments"` // environment variable
User string `json:"user" toml:"user"` // user account name
Directory string `json:"directory" toml:"directory"` // execution dir
Restart bool `json:"restart" toml:"restart"` // restart policy
RestartSec int `json:"restart_sec" toml:"restart_sec"` // start interval
ConfData string `json:"conf_data" toml:"conf_data"` // configuration data
Config string `json:"config" toml:"config"` // profile name used for specific configuration
}
ProgramExt the ext of the program, mainly scan the systemd or supervisor config of the app
type RegInfo ¶
type RegInfo struct {
Name string `json:"name" toml:"name"`
Scheme string `json:"scheme" toml:"scheme"`
Address string `json:"address" toml:"address"`
Labels map[string]string `json:"labels" toml:"labels"`
Services map[string]DubboInfo `json:"services" toml:"services"`
}
RegInfo ...
type RegNode ¶
type RegNode struct {
ServiceNode
LastCheckTime *atomic.Int64
NextCheckTime *atomic.Int64
Disable *atomic.Bool
// contains filtered or unexported fields
}
RegNode 检查点
type Result ¶
type Result int
Result ...
var FailResult Result = 2
FailResult ...
var SuccessResult Result = 1
SuccessResult ...
type ServiceConf ¶
type ServiceConf struct {
Content string `json:"content"`
Resources []Resource `json:"resources"`
Metadata struct {
Format string `json:"format"` // content编码格式: toml/yaml/json
Timestamp int64 `json:"timestamp"` //
Version string `json:"version"`
FileName string `json:"file_name"` // 文件名称 config-live/config-trunk
Encoded bool `json:"encoded"` // content是否加密
AppName string `json:"app_name" toml:"app_name" `
} `json:"metadata"`
}
ServiceConf ...
type ServiceNode ¶
type ServiceNode struct {
AppName string `json:"appName" toml:"appName"`
Schema string `json:"schema" toml:"schema"`
IP string `json:"ip" toml:"ip"`
Port string `json:"port" toml:"port"`
Methods []string `json:"methods" toml:"methods"`
Env string `json:"env" toml:"env"`
RegInfo RegInfo `json:"regInfo" toml:"regInfo"`
Configuration *ServiceNodeConfiguration `json:"configuration" toml:"configuration"`
}
ServiceNode ...
type ServiceNodeConfiguration ¶
type ServiceNodeConfiguration struct {
}
ServiceNodeConfiguration ...