metrics

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IsEnabled        bool
	DisableBandwidth bool
	SinkType         string
	SinkConn         string
	Scope            string
}

The configuration required by the metrics module

type Module

type Module struct {
	// contains filtered or unexported fields
}

func New

func New(nodeID string, config *Config) (*Module, error)

func (*Module) AddDBOperation

func (m *Module) AddDBOperation(project, dbType, col string, count int64, op utils.OperationType)

func (*Module) AddEgress

func (m *Module) AddEgress(project string, bytes uint64)

AddEgress add the bytes to the egress counter of that project

func (*Module) AddIngress

func (m *Module) AddIngress(project string, bytes uint64)

AddIngress add the bytes to the ingress counter of that project

func (*Module) LoadMetrics

func (m *Module) LoadMetrics() []interface{}

Jump to

Keyboard shortcuts

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