collector

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultTimeout defines the default timeout when connecting to a router
	DefaultTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func NewCollector

func NewCollector(cfg *config.Config, opts ...Option) (prometheus.Collector, error)

NewCollector creates a collector instance

Types

type ArvancloudCollector

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

ArvancloudCollector is the interface a collector has to implement.

type Option

type Option func(*collector)

Option applies options to collector

func WithCDN

func WithCDN() Option

WithCDN enables CDN metrics

func WithObject

func WithObject() Option

WithObject enables ObjectStorage metrics

func WithTimeout

func WithTimeout(d time.Duration) Option

WithTimeout sets timeout for connecting to router

Jump to

Keyboard shortcuts

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