Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgentServer ¶
func NewAgentServer(host, port string)
NewAgentServer function create the http api
func SetupLogger ¶
func SetupLogger()
Types ¶
type GlobalMessages ¶
type GlobalMessages struct { MaxSize int Events []Message `json:"events"` // contains filtered or unexported fields }
GlobalMessages define the Messages Manager
var MessagesHub *GlobalMessages
MessagesHub for global message hub
func NewGloabalMessages ¶
func NewGloabalMessages(max int) *GlobalMessages
NewGloabalMessages create a new messages manager
func (*GlobalMessages) Get ¶
func (g *GlobalMessages) Get() ([]byte, error)
Get get current message and delete it from messages manager
type IPWithPort ¶
type IPWithPort struct { IPAddress string `json:"ipaddress" valid:"ip"` Port string `json:"port" valid:"port"` Enable bool `json:"enable" valid:"-"` }
IPWithPort define the posted node info
func (*IPWithPort) Validate ¶
func (ipp *IPWithPort) Validate() error
Validate if ip and port infomation is valid
type JSONResponse ¶
type JSONResponse struct { CurrentMessages []Message `json:"messages"` ID string `json:"id"` Status string `json:"status"` Error string `json:"error"` NodeInfos []core.NodeInfo `json:"nodes"` }
JSONResponse the response to front end
Click to show internal directories.
Click to hide internal directories.