server

package
v0.0.0-...-9a1261c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRun

func MustRun(mux *http.ServeMux, host string, port int)

func NewServer

func NewServer(config *Config) (*http.ServeMux, error)

Types

type API

type API struct {
	Queryable   storage.Queryable
	QueryEngine *promql.Engine

	CORSOrigin *regexp.Regexp
	// contains filtered or unexported fields
}

func (*API) Register

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

Register the API's endpoints in the given router.

type Config

type Config struct {
	DataDir            string
	CORSRegex          *regexp.Regexp
	QueryTimeout       time.Duration
	QueryConcurrency   int
	QueryMaxSamples    int
	QueryLookbackDelta time.Duration
}

Jump to

Keyboard shortcuts

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