api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LocalhostRepresentations = []string{"127.0.0.1", "localhost", "::1"}
)

Functions

This section is empty.

Types

type API

type API struct {
	Queryable   storage.SampleAndChunkQueryable
	QueryEngine *promql.Engine
	// contains filtered or unexported fields
}

API can register a set of endpoints in a router and handle them using the provided storage and query engine.

func New

New returns an initialized API type.

func (*API) Register

func (api *API) Register(r *route.Router)

Register the API's endpoints in the given router.

type GlobalURLOptions

type GlobalURLOptions struct {
	ListenAddress string
	Host          string
	Scheme        string
}

GlobalURLOptions contains fields used for deriving the global URL for local targets.

Jump to

Keyboard shortcuts

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