api_v2

package
v2.0.0-beta.5+incompat... Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2017 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API encapsulates all API services.

func New

func New(
	now func() time.Time,
	db func() *tsdb.DB,
	qe *promql.Engine,
	q func(mint, maxt int64) (storage.Querier, error),
	targets func() []*retrieval.Target,
	alertmanagers func() []*url.URL,
	enableAdmin bool,
) *API

New returns a new API object.

func (*API) HTTPHandler

func (api *API) HTTPHandler(grpcAddr string) (http.Handler, error)

HTTPHandler returns an HTTP handler for a REST API gateway to the given grpc address.

func (*API) RegisterGRPC

func (api *API) RegisterGRPC(srv *grpc.Server)

RegisterGRPC registers all API services with the given server.

type Admin

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

Admin provides an administration interface to Prometheus.

func NewAdmin

func NewAdmin(db func() *tsdb.DB) *Admin

NewAdmin returns a Admin server.

func (*Admin) DeleteSeries

DeleteSeries implements pb.AdminServer.

func (*Admin) TSDBSnapshot

TSDBSnapshot implements pb.AdminServer.

Jump to

Keyboard shortcuts

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