targets

package
v0.26.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTargetsServer

func RegisterTargetsServer(targetsSrv targetspb.TargetsServer) func(*grpc.Server)

Types

type GRPCClient

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

GRPCClient allows to retrieve targets from local gRPC streaming server implementation. TODO(bwplotka): Switch to native gRPC transparent client->server adapter once available.

func NewGRPCClient

func NewGRPCClient(ts targetspb.TargetsServer) *GRPCClient

func NewGRPCClientWithDedup

func NewGRPCClientWithDedup(ts targetspb.TargetsServer, replicaLabels []string) *GRPCClient

func (*GRPCClient) Targets

type Prometheus

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

Prometheus implements targetspb.Targets gRPC that allows to fetch targets from Prometheus HTTP api/v1/targets endpoint.

func NewPrometheus

func NewPrometheus(base *url.URL, client *promclient.Client, extLabels func() labels.Labels) *Prometheus

NewPrometheus creates new targets.Prometheus.

func (*Prometheus) Targets

Targets returns all specified targets from Prometheus.

type Proxy

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

Proxy implements targetspb.Targets gRPC that fans out requests to given targetspb.Targets.

func NewProxy

func NewProxy(logger log.Logger, targets func() []targetspb.TargetsClient) *Proxy

NewProxy returns new targets.Proxy.

func (*Proxy) Targets

type UnaryClient

type UnaryClient interface {
	Targets(ctx context.Context, req *targetspb.TargetsRequest) (*targetspb.TargetDiscovery, storage.Warnings, error)
}

UnaryClient is gRPC targetspb.Targets client which expands streaming targets API. Useful for consumers that does not support streaming.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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