servicediscovery

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPSDTarget

type HTTPSDTarget struct {
	Targets []string           `json:"targets"`
	Labels  promModel.LabelSet `json:"labels"`
}

type Worker

type Worker struct {
	ZoneBlacklist       *regexp.Regexp
	ZoneWhitelist       *regexp.Regexp
	RecordTypeWhitelist *regexp.Regexp
	// contains filtered or unexported fields
}

Worker contains an API client to interact with the NS1 api, as well as a cache of DNS records and the Prometheus targets created from those records. Worker gets registered on a different handler for the `/sd` path and run via the same HTTP server as the metrics exporter.

func NewWorker

func NewWorker(logger log.Logger, client *api.Client, blacklist, whitelist, recordType *regexp.Regexp) *Worker

func (*Worker) Refresh

func (w *Worker) Refresh()

func (*Worker) RefreshData added in v0.3.0

func (w *Worker) RefreshData()

func (*Worker) RefreshPrometheusTargetData

func (w *Worker) RefreshPrometheusTargetData()

func (*Worker) RefreshRecordData

func (w *Worker) RefreshRecordData()

func (*Worker) RefreshZoneData added in v0.2.0

func (w *Worker) RefreshZoneData()

func (*Worker) ServeHTTP

func (w *Worker) ServeHTTP(writer http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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