api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: AGPL-3.0 Imports: 51 Imported by: 10

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 ConfigProcess

func ConfigProcess()

func ConfigSetup

func ConfigSetup()

func Fix

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

Fix assures a series is in quantized form: 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

Types

type GenericPeerResponse added in v1.0.0

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

type GroupData added in v1.0.0

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

GroupData embodies a set of requests broken down by whether requests are MDP-optimizable, and by archivesID

func NewGroupData added in v1.0.0

func NewGroupData() GroupData

func (GroupData) Len added in v1.0.0

func (gd GroupData) Len() int

type PeerResponse

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

type PrioritySetter

type PrioritySetter interface {
	ExplainPriority() interface{}
}

type ReqMap added in v1.0.0

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

ReqMap is a map of requests of data, it has single requests for which no pre-normalization effort will be performed, and requests that can be pre-normalized together to the same resolution, bundled by their PNGroup

func NewReqMap added in v1.0.0

func NewReqMap() *ReqMap

func (*ReqMap) Add added in v1.0.0

func (r *ReqMap) Add(req models.Req)

Add adds a models.Req to the ReqMap

func (ReqMap) Dump added in v1.0.0

func (r ReqMap) Dump() string

Dump provides a human readable string representation of the ReqsMap

type ReqsByArchives added in v1.0.0

type ReqsByArchives [][]models.Req

Requests indexed by their ArchivesID

func (*ReqsByArchives) Add added in v1.0.0

func (rba *ReqsByArchives) Add(idx int, r models.Req)

func (ReqsByArchives) HasData added in v1.0.0

func (rba ReqsByArchives) HasData() bool

func (ReqsByArchives) Len added in v1.0.0

func (rba ReqsByArchives) Len() int

func (ReqsByArchives) OutInterval added in v1.0.0

func (rba ReqsByArchives) OutInterval() uint32

OutInterval returns the outinterval of the ReqsByArchives this assumes that all requests have been planned to a consistent out interval, of course.

type ReqsPlan added in v1.0.0

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

ReqsPlan holds requests that have been planned, broken down by PNGroup and MDP-optimizability

func NewReqsPlan added in v1.0.0

func NewReqsPlan(reqs ReqMap) ReqsPlan

NewReqsPlan generates a ReqsPlan based on the provided ReqMap.

func (ReqsPlan) Dump added in v1.0.0

func (rp ReqsPlan) Dump() string

Dump provides a human readable string representation of the ReqsPlan

func (ReqsPlan) List added in v1.0.0

func (rp ReqsPlan) List() []models.Req

List returns the requests contained within the plan as a slice

func (ReqsPlan) PointsFetch added in v1.0.0

func (rp ReqsPlan) PointsFetch() uint32

PointsFetch returns how many points this plan will fetch when executed

func (ReqsPlan) PointsReturn added in v1.0.0

func (rp ReqsPlan) PointsReturn(planMDP uint32) uint32

PointsReturn estimates the amount of points that will be returned for this request best effort: not aware of summarize(), aggregation functions, runtime normalization. but does account for runtime consolidation

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
	MetaRecords  idx.MetaRecordIdx
	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) BindMetaRecords added in v1.0.0

func (s *Server) BindMetaRecords(mr idx.MetaRecordIdx)

func (*Server) BindMetricIndex

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

func (*Server) BindPrioritySetter

func (s *Server) BindPrioritySetter(p PrioritySetter)

func (*Server) BindTracer

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

func (*Server) IndexTagTerms added in v1.0.0

func (s *Server) IndexTagTerms(ctx *middleware.Context, req models.IndexTagTerms)

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