api_v2

package
v2.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: Apache-2.0 Imports: 20 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(
	db func() *tsdb.DB,
	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) TSDBCleanTombstones

TSDBCleanTombstones implements pb.AdminServer.

func (*Admin) TSDBSnapshot

func (s *Admin) TSDBSnapshot(_ old_ctx.Context, req *pb.TSDBSnapshotRequest) (*pb.TSDBSnapshotResponse, error)

TSDBSnapshot implements pb.AdminServer.

type AdminDisabled

type AdminDisabled struct {
}

AdminDisabled implements the administration interface that informs that the API endpoints are disabled.

func (*AdminDisabled) DeleteSeries

DeleteSeries imeplements pb.AdminServer.

func (*AdminDisabled) TSDBCleanTombstones

TSDBCleanTombstones implements pb.AdminServer.

func (*AdminDisabled) TSDBSnapshot

TSDBSnapshot implements pb.AdminServer.

Jump to

Keyboard shortcuts

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