metrics

package
v0.0.0-...-43464fb Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const CollectionInterval = 10 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewCollector

func NewCollector(client *daemonrpc.Client) *Collector

func (*Collector) Collect

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

func (*Collector) CollectBlockCount

func (c *Collector) CollectBlockCount(ctx context.Context) error

func (*Collector) CollectFeeEstimate

func (c *Collector) CollectFeeEstimate(ctx context.Context) error

func (*Collector) CollectInfoStats

func (c *Collector) CollectInfoStats(ctx context.Context, ch chan<- prometheus.Metric) error

func (*Collector) CollectLastBlockHeader

func (c *Collector) CollectLastBlockHeader(ctx context.Context, ch chan<- prometheus.Metric) error

func (*Collector) CollectMempoolStats

func (c *Collector) CollectMempoolStats(ctx context.Context, ch chan<- prometheus.Metric) error

func (*Collector) Describe

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

func (*Collector) Run

func (c *Collector) Run(ctx context.Context) error

type CollectorFunc

type CollectorFunc func(ctx context.Context) error

type Exporter

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

func NewExporter

func NewExporter(opts ...Option) *Exporter

func (*Exporter) Close

func (e *Exporter) Close() (err error)

Close gracefully closes the tcp listener associated with it.

func (*Exporter) Run

func (e *Exporter) Run(ctx context.Context) error

Run initiates the HTTP server to serve the metrics.

This is a blocking method - make sure you either make use of goroutines to not block if needed.

type Option

type Option func(e *Exporter)

Jump to

Keyboard shortcuts

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