api

package
v1.4.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

nolint: varnamelen

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Client      *monitoring.MetricsClient
	MetricsDesc map[string]*prometheus.Desc // all known metrics descriptions
	// contains filtered or unexported fields
}

func GetCollector

func GetCollector(c *Controller) *Collector

func (Collector) Collect

func (zc Collector) Collect(ch chan<- prometheus.Metric)

Implements prometheus.Collector interface.

func (Collector) Describe

func (zc Collector) Describe(ch chan<- *prometheus.Desc)

Implements prometheus.Collector interface.

type Config

type Config struct {
	Server   ServerConfig
	Exporter ExporterConfig
}

func DefaultConfig

func DefaultConfig() *Config

type Controller

type Controller struct {
	Config *Config
	Log    log.Logger
}

func NewController

func NewController(cfg *Config) *Controller

func (*Controller) Run

func (c *Controller) Run()

type ExporterConfig

type ExporterConfig struct {
	Port    string
	Log     *LogConfig
	Metrics *MetricsConfig
}

type LogConfig

type LogConfig struct {
	Level  string
	Output string
}

We export below types in order for cli package to be able to read it from configuration file.

type MetricsConfig

type MetricsConfig struct {
	Path string
}

type ServerConfig

type ServerConfig struct {
	Protocol string
	Host     string
	Port     string
}

Jump to

Keyboard shortcuts

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