collector

package
v0.0.0-...-19b31f8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	sync.Mutex // Our exporter object will be locakble to protect from concurrent scrapes
	// contains filtered or unexported fields
}

Exporter collects S3 metrics

func New

func New(awsRegion string) (*Exporter, error)

New returns an initialized exporter

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect fetches the stats from configured S3 and delivers them as Prometheus metrics. It implements prometheus.Collector

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe describes all the metrics ever exported by the S3 exporter. It implements prometheus.Collector.

type S3Client

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

S3Client is a wrapper for AWS s3 client that implements helpers to get S3 metrics

func NewS3Client

func NewS3Client(awsRegion string) (*S3Client, error)

NewS3Client will return an initialized S3Client

func (*S3Client) GetBuckets

func (e *S3Client) GetBuckets() ([]*types.S3Bucket, error)

GetBuckets will get the clusters from the S3 API

type S3Gatherer

type S3Gatherer interface {
	GetBuckets() ([]*types.S3Bucket, error)
}

S3Gatherer is the interface that implements the methods required to gather S3 data

Jump to

Keyboard shortcuts

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