api

package
v0.0.0-...-15fa731 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: AGPL-3.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Addr   string
	UseSSL bool
)
View Source
var InvalidFormatErr = errors.New("invalid format specified")
View Source
var InvalidTimeRangeErr = errors.New("invalid time range requested")
View Source
var MissingOrgHeaderErr = errors.New("orgId not set in headers")
View Source
var MissingQueryErr = errors.New("missing query param")
View Source
var NotFoundErr = errors.New("not found")

Functions

func BuildMetadataSeriesSet

func BuildMetadataSeriesSet(seriesNames []Series) (*models.PrometheusSeriesSet, error)

func ConfigProcess

func ConfigProcess()

func ConfigSetup

func ConfigSetup()

func Fix

func Fix(in []schema.Point, from, to, interval uint32) []schema.Point

Fix assures all points are nicely aligned (quantized) and padded with nulls in case there's gaps in data graphite does this quantization before storing, we may want to do that as well at some point note: values are quantized to the right because we can't lie about the future: e.g. if interval is 10 and we have a point at 8 or at 2, it will be quantized to 10, we should never move values to earlier in time.

func NewGraphiteProxy

func NewGraphiteProxy(u *url.URL) *httputil.ReverseProxy

func NewQuerier

func NewQuerier(ctx context.Context, s *Server, from, to uint32, orgId uint32, metadataOnly bool) storage.Querier

func SeriesToSeriesSet

func SeriesToSeriesSet(out []models.Series) (*models.PrometheusSeriesSet, error)

Types

type PeerResponse

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

type PrioritySetter

type PrioritySetter interface {
	ExplainPriority() interface{}
}

type Series

type Series struct {
	Pattern string // pattern used for index lookup. typically user input like foo.{b,a}r.*
	Series  []idx.Node
	Node    cluster.Node
}

type Server

type Server struct {
	Addr string
	SSL  bool

	Macaron         *macaron.Macaron
	MetricIndex     idx.MetricIndex
	MemoryStore     mdata.Metrics
	BackendStore    mdata.Store
	PromQueryEngine *promql.Engine
	Cache           cache.Cache

	Tracer opentracing.Tracer
	// contains filtered or unexported fields
}

func NewServer

func NewServer() (*Server, error)

func (*Server) BindBackendStore

func (s *Server) BindBackendStore(store mdata.Store)

func (*Server) BindCache

func (s *Server) BindCache(cache cache.Cache)

func (*Server) BindMemoryStore

func (s *Server) BindMemoryStore(store mdata.Metrics)

func (*Server) BindMetricIndex

func (s *Server) BindMetricIndex(i idx.MetricIndex)

func (*Server) BindPrioritySetter

func (s *Server) BindPrioritySetter(p PrioritySetter)

func (*Server) BindPromQueryEngine

func (s *Server) BindPromQueryEngine()

func (*Server) BindTracer

func (s *Server) BindTracer(tracer opentracing.Tracer)

func (*Server) Querier

func (s *Server) Querier(ctx context.Context, min, max int64) (storage.Querier, error)

Querier creates a new querier that will operate on the subject server it needs the org-id stored in a context value

func (*Server) RegisterRoutes

func (s *Server) RegisterRoutes()

func (*Server) Run

func (s *Server) Run()

func (*Server) Stop

func (s *Server) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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