v1

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDatabase = "cbmon"
	PullDatabase    = "cbmonpull"
)

Variables

This section is empty.

Functions

func BuildQuery

func BuildQuery(isPush bool, vmId string, metric string, period string, aggregateType string, duration string) (string, error)

Types

type Config

type Config struct {
	Addr     string
	Username string
	Password string
	Database string
}

type Storage

type Storage struct {
	Config Config
	Client influxdbClient.Client
}

func GetInstance

func GetInstance() *Storage

func (Storage) DeleteMetric

func (s Storage) DeleteMetric(database string, metric, duration string) error

func (Storage) Initialize

func (s Storage) Initialize() error

func (Storage) ReadMetric

func (s Storage) ReadMetric(isPush bool, nsId string, mcisId string, vmId string, metric string, period string, function string, duration string) (interface{}, error)

func (Storage) WriteMetric

func (s Storage) WriteMetric(dbName string, metrics map[string]interface{}) error

func (Storage) WriteOnDemandMetric

func (s Storage) WriteOnDemandMetric(dbName string, metricName string, tagArr map[string]string, metricVal map[string]interface{}) error

Jump to

Keyboard shortcuts

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