Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateConfFileCrcs() string
- func (c *Client) CreateMetaServers() []string
- func (c *Client) ListenerResults(confFile, crc string) ([]base.ClientReportRspItem, error)
- func (c *Client) MetaGet(addr string) ([]string, error)
- func (c *Client) Polling(addr string) error
- func (c *Client) PostConf(confFile, raw, clientIps string) (string, error)
- func (c *Client) ReadConfig(confFile string, wait bool) <-chan bool
- func (c *Client) TryPost(addr, confFile, raw, clientIps string) (bool, interface{})
- func (c *Client) TryUploadReport(url string, report *ClientReport) bool
- func (c *Client) UploadReport(report *ClientReport)
- type ClientReport
- type ClientReportRsp
- type MetaRsp
- type PostRsp
- type ReqBody
- type RspHead
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client defines the typhon client.
func MakeClient ¶
func MakeClient(c *base.Context, fileRaw chan base.FileRawWait) *Client
MakeClient makes a apollo client.
func (*Client) CreateConfFileCrcs ¶
CreateConfFileCrcs creates conf files and their crcs.
func (*Client) CreateMetaServers ¶
CreateMetaServers creates the meta servers addresses.
func (*Client) ListenerResults ¶
func (c *Client) ListenerResults(confFile, crc string) ([]base.ClientReportRspItem, error)
ListenerResults gets the listener results from the server.
func (*Client) PostConf ¶
PostConf posts the conf to the server with clientIps (blank/comma separated IP addresses or all) returns crc and error info.
func (*Client) ReadConfig ¶
ReadConfig tries to refresh conf defined by confFile or all (confFile is empty).
func (*Client) TryUploadReport ¶
func (c *Client) TryUploadReport(url string, report *ClientReport) bool
TryUploadReport try to upload report.
func (*Client) UploadReport ¶
func (c *Client) UploadReport(report *ClientReport)
UploadReport uploads the listeners reports.
type ClientReport ¶
type ClientReport struct { Host string `json:"host"` Pid string `json:"pid"` Bin string `json:"bin"` Items []base.ClientReportItem `json:"items"` }
ClientReport defines the structure of client report uploading.
type ClientReportRsp ¶
type ClientReportRsp struct { RspHead Data []base.ClientReportRspItem `json:"data"` }
ClientReportRsp defines the top response structure of client report querying.
type MetaRsp ¶
type MetaRsp struct { Status int `json:"status"` Message string `json:"message"` Data string `json:"data"` }
MetaRsp defines the meta response structure of typhon meta service.