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: 0

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