Add structs for server info.
This commit is contained in:
parent
c6c4c5f260
commit
ec55bf1878
|
@ -0,0 +1,25 @@
|
||||||
|
package push_common
|
||||||
|
|
||||||
|
type ServerInfo struct {
|
||||||
|
RevisionHash string `json:"revisionHash"`
|
||||||
|
Time uint32 `json:"time"`
|
||||||
|
Hostname string `json:"hostname"`
|
||||||
|
RedisConnectionConf *RedisConnectionConf `json:"redisConnectionConf"`
|
||||||
|
ActivePushAmount uint32 `json:"activePushAmount"`
|
||||||
|
UptraceInfo *UptraceInfo `json:"uptraceInfo"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RedisConnectionConf struct {
|
||||||
|
Host string `json:"host"`
|
||||||
|
Port int `json:"port"`
|
||||||
|
Db int `json:"db"`
|
||||||
|
Prefix string `json:"prefix"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type UptraceInfo struct {
|
||||||
|
UptraceOn bool `json:"uptraceOn"`
|
||||||
|
UptraceDSN string `json:"uptraceDSN"`
|
||||||
|
ServiceName string `json:"serviceName"`
|
||||||
|
ServiceVersion string `json:"serviceVersion"`
|
||||||
|
DeploymentEnvironment string `json:"deploymentEnvironment"`
|
||||||
|
}
|
8
util.go
8
util.go
|
@ -5,11 +5,3 @@ import "strconv"
|
||||||
func uint32ToString(n uint32) string {
|
func uint32ToString(n uint32) string {
|
||||||
return strconv.FormatUint(uint64(n), 10)
|
return strconv.FormatUint(uint64(n), 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
type UptraceInfo struct {
|
|
||||||
UptraceOn bool `json:"uptraceOn"`
|
|
||||||
UptraceDSN string `json:"uptraceDSN"`
|
|
||||||
ServiceName string `json:"serviceName"`
|
|
||||||
ServiceVersion string `json:"serviceVersion"`
|
|
||||||
DeploymentEnvironment string `json:"deploymentEnvironment"`
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue