collector

package
v0.0.0-...-ff32a63 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

type FRMClient

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

func NewFRMClient

func NewFRMClient(baseURL string, l log.Logger) (*FRMClient, error)

func (*FRMClient) GetJSON

func (c *FRMClient) GetJSON(ctx context.Context, uri string, into any) error

type PlayerCollector

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

func NewForPlayers

func NewForPlayers(client *FRMClient, reg prometheus.Registerer, logger log.Logger) *PlayerCollector

type PowerCollector

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

func NewForPower

func NewForPower(client *FRMClient, reg prometheus.Registerer, logger log.Logger) *PowerCollector

type Runner

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

func NewRunner

func NewRunner(opts RunnerOpts, cs ...Collector) *Runner

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

Run starts the runner and blocks. It cannot be called concurrently.

type RunnerOpts

type RunnerOpts struct {
	ScrapeInterval time.Duration
	Log            log.Logger
}

Jump to

Keyboard shortcuts

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