collectors

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CephObjectStoreInformer

func CephObjectStoreInformer(opts *options.Options) cache.SharedIndexInformer

func RegisterCustomResourceCollectors

func RegisterCustomResourceCollectors(registry *prometheus.Registry, opts *options.Options)

RegisterCustomResourceCollectors registers the custom resource collectors in the given prometheus.Registry This is used to expose metrics about the Custom Resources

Types

type CephBlockPoolCollector

type CephBlockPoolCollector struct {
	MirroringImageHealth *prometheus.Desc
	MirroringStatus      *prometheus.Desc
	Informer             cache.SharedIndexInformer
	AllowedNamespaces    []string
}

CephBlockPoolCollector is a custom collector for CephBlockPool Custom Resource

func NewCephBlockPoolCollector

func NewCephBlockPoolCollector(opts *options.Options) *CephBlockPoolCollector

NewCephBlockPoolCollector constructs a collector

func (*CephBlockPoolCollector) Collect

func (c *CephBlockPoolCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*CephBlockPoolCollector) Describe

func (c *CephBlockPoolCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*CephBlockPoolCollector) Run

func (c *CephBlockPoolCollector) Run(stopCh <-chan struct{})

Run starts CephBlockPool informer

type CephClusterCollector added in v0.4.10

type CephClusterCollector struct {
	MirrorDaemonCount *prometheus.Desc
	Informer          cache.SharedIndexInformer
	AllowedNamespaces []string
}

CephClusterCollector is a custom collector for CephCluster Custom Resource

func NewCephClusterCollector added in v0.4.10

func NewCephClusterCollector(opts *options.Options) *CephClusterCollector

NewCephClusterCollector constructs a collector

func (*CephClusterCollector) Collect added in v0.4.10

func (c *CephClusterCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*CephClusterCollector) Describe added in v0.4.10

func (c *CephClusterCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*CephClusterCollector) Run added in v0.4.10

func (c *CephClusterCollector) Run(stopCh <-chan struct{})

Run starts CephClusters informer

type CephObjectStoreCollector

type CephObjectStoreCollector struct {
	RGWHealthStatus   *prometheus.Desc
	Informer          cache.SharedIndexInformer
	AllowedNamespaces []string
}

CephObjectStoreCollector is a custom collector for CephObjectStore Custom Resource

func NewCephObjectStoreCollector

func NewCephObjectStoreCollector(opts *options.Options) *CephObjectStoreCollector

NewCephObjectStoreCollector constructs a collector

func (*CephObjectStoreCollector) Collect

func (c *CephObjectStoreCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*CephObjectStoreCollector) Describe

func (c *CephObjectStoreCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*CephObjectStoreCollector) Run

func (c *CephObjectStoreCollector) Run(stopCh <-chan struct{})

Run starts CephObjectStore informer

type Informer

type Informer interface {
	GetInformer() cache.SharedIndexInformer
}

type MockClient

type MockClient struct {
	// MockDo is a type that mock the Do method from the HTTP package
	MockDo MockDoType
}

MockClient is the mock of the HTTP Client It can be used to mock HTTP request/response from the rgw admin ops API

func (*MockClient) Do

func (m *MockClient) Do(req *http.Request) (*http.Response, error)

Do is the mock client's `Do` func

type MockDoType

type MockDoType func(req *http.Request) (*http.Response, error)

MockDoType is a custom type that allows setting the function that our Mock Do func will run instead

type ObjectBucketCollector

type ObjectBucketCollector struct {
	OBSizeTotal           *prometheus.Desc
	OBSizeMax             *prometheus.Desc
	OBObjectCountTotal    *prometheus.Desc
	OBObjectCountMax      *prometheus.Desc
	ObjectBucketClaimInfo *prometheus.Desc
	Informer              cache.SharedIndexInformer
	AllowedNamespaces     []string
	// contains filtered or unexported fields
}

ObjectBucketCollector is a custom collector for CephObjectStore Custom Resource

func NewObjectBucketCollector

func NewObjectBucketCollector(opts *options.Options) *ObjectBucketCollector

NewObjectBucketCollector constructs a collector

func (*ObjectBucketCollector) Collect

func (c *ObjectBucketCollector) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector interface

func (*ObjectBucketCollector) Describe

func (c *ObjectBucketCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector interface

func (*ObjectBucketCollector) Run

func (c *ObjectBucketCollector) Run(stopCh <-chan struct{})

Run starts CephObjectStore informer

type Tests

type Tests = []struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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