client

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package client provides a client interface to the Agent HTTP API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	PrometheusClient
}

Client is a collection of all subsystem clients.

func New

func New(addr string) *Client

New creates a new Client.

type PrometheusClient

type PrometheusClient interface {
	// Instances runs the list of currently running instances.
	Instances(ctx context.Context) ([]string, error)

	// ListConfigs runs the list of instance configs stored in the config
	// management KV store.
	ListConfigs(ctx context.Context) (*configapi.ListConfigurationsResponse, error)

	// GetConfiguration returns a named configuration from the config
	// management KV store.
	GetConfiguration(ctx context.Context, name string) (*instance.Config, error)

	// PutConfiguration adds or updates a named configuration into the
	// config management KV store.
	PutConfiguration(ctx context.Context, name string, cfg *instance.Config) error

	// DeleteConfiguration removes a named configuration from the config
	// management KV store.
	DeleteConfiguration(ctx context.Context, name string) error
}

PrometheusClient is the client interface to the API exposed by the Prometheus subsystem of the Grafana Cloud Agent.

Jump to

Keyboard shortcuts

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