exporter

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package exporter exports services to filesystem for prometheus file discovery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.7.0

type Config struct {
	Directory          string
	ResyncInterval     time.Duration
	PrometheusRegistry prometheus.Registerer
	HTTPListenAddr     string
}

Config configures the exporter.

type Exporter

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

Exporter writes services from store to filesystem for prometheus file based service discovery.

func New

func New(b store.Backend, log *zap.SugaredLogger, cfg Config) *Exporter

New creates a new exporter.

func (*Exporter) Start

func (e *Exporter) Start(ctx context.Context, server string) error

Start starts the exporter and it blocks until context is done.

type TargetGroup added in v0.8.0

type TargetGroup struct {
	Targets []string         `json:"targets,omitempty"`
	Labels  discovery.Labels `json:"labels,omitempty"`
}

TargetGroup represents a prometheus target group.

func NewTargetGroup added in v0.8.0

func NewTargetGroup(s discovery.Service, cfg discovery.ExportConfig) TargetGroup

NewTargetGroup creates a new target group from discovery.Service.

Jump to

Keyboard shortcuts

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