collector

package
v0.0.0-...-12b7c9b Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector is a prometheus.Collector that retrieves metrics for a Snowflake account.

func NewCollector

func NewCollector(logger log.Logger, c *Config) *Collector

NewCollector creates a new collector from a given config. The config is assumed to be valid.

func (*Collector) Collect

func (c *Collector) Collect(metrics chan<- prometheus.Metric)

Collect collects all metrics for this collector, and emits them through the provided channel. It implements prometheus.Collector.

func (*Collector) Describe

func (c *Collector) Describe(descs chan<- *prometheus.Desc)

Describe returns all metric descriptions of the collector by emitting them down the provided channel. It implements prometheus.Collector.

type Config

type Config struct {
	AccountName        string
	Username           string
	Password           string
	Role               string
	Warehouse          string
	PrivateKeyPath     string
	PrivateKeyPassword string
	PrivateKey         *rsa.PrivateKey
}

func (Config) Validate

func (c Config) Validate() error

Jump to

Keyboard shortcuts

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