promsd

package module
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter runs an unknown service discovery implementation and converts its target groups to JSON and writes to a file for file_sd.

func NewAdapter

func NewAdapter(ctx context.Context, name string, d discovery.Discoverer, rw ReadWriter, logger log.Logger) *Adapter

NewAdapter creates a new instance of Adapter.

func (*Adapter) Run

func (a *Adapter) Run()

Run starts a Discovery Manager and the custom service discovery implementation.

type CustomSD

type CustomSD struct {
	Targets []string          `json:"targets"`
	Labels  map[string]string `json:"labels"`
}

type ReadWriter

type ReadWriter interface {
	Read() ([]CustomSD, error)
	Write(sd []CustomSD) error
}

func NewConfigMapReadWriter added in v1.2.1

func NewConfigMapReadWriter(ctx context.Context, namespace, name, key string) (ReadWriter, error)

func NewFileReadWriter added in v1.2.1

func NewFileReadWriter(output string) (ReadWriter, error)

Directories

Path Synopsis
util

Jump to

Keyboard shortcuts

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