netcollect

package
v0.0.0-...-cb472e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL