Documentation ¶
Index ¶
Constants ¶
View Source
const MockMessage = `` /* 933-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectorBuild ¶
type CollectorBuild struct { Version string `json:"version"` BuildCommit string `json:"build_commit"` BuildTime string `json:"build_time"` GoVersion string `json:"go_version"` }
CollectorBuild define a netcollector build information
type NetCollect ¶
type NetCollect struct {
// contains filtered or unexported fields
}
NetCollect collect the net information
func NewNetCollect ¶
func NewNetCollect(ctx context.Context, db dal.RDB, authManager *extensions.AuthManager) *NetCollect
NewNetCollect returns a new netcollector
func (*NetCollect) Analyze ¶
func (h *NetCollect) Analyze(msg *string) error
Analyze implements the Analyzer interface
func (*NetCollect) Hash ¶
func (h *NetCollect) Hash(cloudid, ip string) (string, error)
Hash returns hash value base on message.
func (*NetCollect) Mock ¶
func (h *NetCollect) Mock() string
Mock returns local mock message for testing.
type ReportMessage ¶
type ReportMessage struct { Timestamp time.Time `json:"timestamp"` Dataid int `json:"dataid"` Type string `json:"type"` Counter int `json:"counter"` Build CollectorBuild `json:"build"` Data []metadata.NetcollectReport `json:"data"` }
ReportMessage define a netcollect message
Click to show internal directories.
Click to hide internal directories.