abstract

package
v0.0.0-...-1205ef1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "m365"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseCollector

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

func NewBaseCollector

func NewBaseCollector(msGraphClient *msgraphsdk.GraphServiceClient, collector string) BaseCollector

func (*BaseCollector) Collect

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

func (*BaseCollector) Describe

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

func (*BaseCollector) GraphClient

func (c *BaseCollector) GraphClient() *msgraphsdk.GraphServiceClient

func (*BaseCollector) ScrapeWorker

func (c *BaseCollector) ScrapeWorker(
	ctx context.Context, logger *slog.Logger, interval time.Duration, function func(ctx context.Context,
	) ([]prometheus.Metric, error),
)

type Collector

type Collector interface {
	prometheus.Collector

	StartBackgroundWorker(ctx context.Context, interval time.Duration)
	ScrapeMetrics(ctx context.Context) ([]prometheus.Metric, error)
}

Jump to

Keyboard shortcuts

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