collect

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnection

func GetConnection(address, certPath, keyPath string, noTls bool) (*grpc.ClientConn, error)

GetConnection returns a gRPC client connection to the onos service

func KPIs

func KPIs(collectors []Collector) []kpis.KPI

KPIs retrieves the list of kpis.KPI from each Collector. It handles each collector error locally, logging the error. In any case, kpis.KPI list is returned, e.g., if one collector presents error or even if all collectors present errors.

Types

type Collector

type Collector interface {
	Collect() ([]kpis.KPI, error)
}

Collector defines an interface for Collectors to retrieve a list of kpis.KPI via the Collect method.

func CreateCollector added in v0.1.2

func CreateCollector(name, serviceAddress string) (Collector, error)

CreateCollector instantiates a new collector based on the const name of the collector specified. Available collectors must be defined in the cost set of strings.

type Configuration

type Configuration interface {
	// contains filtered or unexported methods
}

Configuration defines the methods expected to fulfill the behavior of a config.

func InitConfig

func InitConfig(configNameInit string) Configuration

InitConfig defines the Configuration to be used for the creation of a connection to a onos service.

func NewConfig

func NewConfig(subsystem string) Configuration

Jump to

Keyboard shortcuts

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