Documentation
¶
Index ¶
- type APIClient
- func (c *APIClient) Debug()
- func (c *APIClient) Describe() api.ClientInfo
- func (c *APIClient) GetNodeInfo() (nodeInfo *api.NodeInfo, err error)
- func (c *APIClient) GetNodeRule() (*[]api.DetectRule, error)
- func (c *APIClient) GetServiceList() (ServiceList *[]api.ServiceInfo, err error)
- func (c *APIClient) ParseServiceList(serviceResponse *[]Service) (*[]api.ServiceInfo, error)
- func (c *APIClient) ReportNodeOnlineIPs(onlineServiceList *[]api.OnlineIP) error
- func (c *APIClient) ReportServiceTraffic(serviceTraffic *[]api.ServiceTraffic) error
- type IllegalItem
- type OnlineIP
- type PostData
- type Response
- type Service
- type ServiceResponse
- type ServiceTraffic
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { APIHost string NodeID int Key string LastReportOnline map[int]int LocalRuleList []api.DetectRule // contains filtered or unexported fields }
func (*APIClient) Describe ¶
func (c *APIClient) Describe() api.ClientInfo
func (*APIClient) GetNodeInfo ¶
func (*APIClient) GetNodeRule ¶
func (c *APIClient) GetNodeRule() (*[]api.DetectRule, error)
func (*APIClient) GetServiceList ¶
func (c *APIClient) GetServiceList() (ServiceList *[]api.ServiceInfo, err error)
func (*APIClient) ParseServiceList ¶ added in v1.0.9
func (c *APIClient) ParseServiceList(serviceResponse *[]Service) (*[]api.ServiceInfo, error)
func (*APIClient) ReportNodeOnlineIPs ¶
func (*APIClient) ReportServiceTraffic ¶
func (c *APIClient) ReportServiceTraffic(serviceTraffic *[]api.ServiceTraffic) error
type IllegalItem ¶
type PostData ¶
type PostData struct {
Data interface{} `json:"data"`
}
PostData is the data structure of post data
type Response ¶
type Response struct { Ret uint `json:"ret"` Data json.RawMessage `json:"data"` }
Response is the common response
type ServiceResponse ¶ added in v1.0.9
type ServiceResponse struct {
Data json.RawMessage `json:"services"`
}
ServiceResponse is the common response
type ServiceTraffic ¶
type ServiceTraffic struct { UID int `json:"serviceid"` Upload int64 `json:"u"` Download int64 `json:"d"` }
UserTraffic is the data structure of traffic
Click to show internal directories.
Click to hide internal directories.