v2

package
v1.0.0-beta7 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 9 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 {
	Bind        string
	MetricsPath string
	Log         zap.Config
	Global      Global
	Servers     []*Server
	Metrics     []*collector.Metric
}

Configuration v2.0 format

func (*Config) Build

func (conf *Config) Build() (*collector.Collector, error)

Build collectors from a configuration v2.0 format and return a collection of all configured collectors

func (*Config) GetBindAddr

func (conf *Config) GetBindAddr() string

Get address where the http server should be bound to

func (*Config) GetMetricsPath

func (conf *Config) GetMetricsPath() string

Get metrics path

type Global

type Global struct {
	QueryTimeout      time.Duration
	MaxConnections    int32
	DefaultCache      int64
	DefaultMode       string
	DefaultDatabase   string
	DefaultCollection string
}

type Server

type Server struct {
	Name string
	URI  string
}

MongoDB client options

Jump to

Keyboard shortcuts

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