throughputagent

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 12 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBulkInsert

func CreateBulkInsert(client *elastic.Client, vdcName string) *elastic.BulkService

CreateBulkInsert creates a BulkIndexInsertService for trafficData

func InsertIntoElastic

func InsertIntoElastic(msg TrafficMessage, bulkInsert *elastic.BulkService)

InsertIntoElastic Adds a TrafficMessage into the bulkInsert

func SetLog

func SetLog(entty *logrus.Entry)

func SetLogger

func SetLogger(nLogger *logrus.Logger)

Types

type ComponentMatcher

type ComponentMatcher struct {
	Name string
	// contains filtered or unexported fields
}

func (*ComponentMatcher) Match

func (m *ComponentMatcher) Match(ip string) bool

type ThroughputAgent

type ThroughputAgent struct {
	ElasticSearchURL string

	Interface string

	VDCName string
	// contains filtered or unexported fields
}

func NewThroughputAgent

func NewThroughputAgent() (*ThroughputAgent, error)

func (*ThroughputAgent) Run

func (ta *ThroughputAgent) Run()

type TrafficMessage

type TrafficMessage struct {
	Timestamp time.Time `json:"@timestamp,omitempty"`
	Component string    `json:"traffic.component,omitempty"`
	Send      int       `json:"traffic.send,omitempty"`
	Recived   int       `json:"traffic.recived,omitempty"`
	Total     int       `json:"traffic.total,omitempty"`
}

Jump to

Keyboard shortcuts

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