package
Version:
v0.0.0-...-6a6dcdd
Opens a new window with list of versions in this module.
Published: Feb 2, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 15
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Register 注册服务
app、host、port: 服务信息
SendMsg
app: 必选,指定应用
host/port: 可选,指定服务器;空则向所有实例的应用发送消息
type Instance struct {
Host string `json:"h"`
Port int `json:"p"`
Weight int `json:"w,omitempty"`
Time int64 `json:"t"`
}
type Request struct {
App string `json:"app" form:"app"`
Host string `json:"host" form:"host"`
Port int `json:"port" form:"port"`
Cpu float32 `json:"cpu" form:"cpu"`
Memo float32 `json:"memo" form:"memo"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.