metrictank: Index | Files | Directories

package api

import ""


Package Files

api.go ccache.go cluster.go config.go dataprocessor.go graphite.go graphite_proxy.go graphite_req.go init.go pprof.go query_engine.go routes.go


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

func ConfigProcess Uses

func ConfigProcess()

func ConfigSetup Uses

func ConfigSetup()

func Fix Uses

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 Uses

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

type GenericPeerResponse Uses

type GenericPeerResponse struct {
    // contains filtered or unexported fields

type GroupData Uses

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 Uses

func NewGroupData() GroupData

func (GroupData) Len Uses

func (gd GroupData) Len() int

type PeerResponse Uses

type PeerResponse struct {
    // contains filtered or unexported fields

type PrioritySetter Uses

type PrioritySetter interface {
    ExplainPriority() interface{}

type ReqMap Uses

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 Uses

func NewReqMap() *ReqMap

func (*ReqMap) Add Uses

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

Add adds a models.Req to the ReqMap

func (ReqMap) Dump Uses

func (r ReqMap) Dump() string

Dump provides a human readable string representation of the ReqsMap

type ReqsByArchives Uses

type ReqsByArchives [][]models.Req

Requests indexed by their ArchivesID

func (*ReqsByArchives) Add Uses

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

func (ReqsByArchives) HasData Uses

func (rba ReqsByArchives) HasData() bool

func (ReqsByArchives) Len Uses

func (rba ReqsByArchives) Len() int

func (ReqsByArchives) OutInterval Uses

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 Uses

type ReqsPlan struct {
    // contains filtered or unexported fields

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

func NewReqsPlan Uses

func NewReqsPlan(reqs ReqMap) ReqsPlan

NewReqsPlan generates a ReqsPlan based on the provided ReqMap.

func (ReqsPlan) Dump Uses

func (rp ReqsPlan) Dump() string

Dump provides a human readable string representation of the ReqsPlan

func (ReqsPlan) List Uses

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

List returns the requests contained within the plan as a slice

func (ReqsPlan) PointsFetch Uses

func (rp ReqsPlan) PointsFetch() uint32

PointsFetch returns how many points this plan will fetch when executed

func (ReqsPlan) PointsReturn Uses

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 Uses

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 Uses

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 Uses

func NewServer() (*Server, error)

func (*Server) BindBackendStore Uses

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

func (*Server) BindCache Uses

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

func (*Server) BindMemoryStore Uses

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

func (*Server) BindMetaRecords Uses

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

func (*Server) BindMetricIndex Uses

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

func (*Server) BindPrioritySetter Uses

func (s *Server) BindPrioritySetter(p PrioritySetter)

func (*Server) BindTracer Uses

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

func (*Server) IndexTagTerms Uses

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

func (*Server) RegisterRoutes Uses

func (s *Server) RegisterRoutes()

func (*Server) Run Uses

func (s *Server) Run()

func (*Server) Stop Uses

func (s *Server) Stop()



Package api imports 51 packages (graph). Updated 2020-07-13. Refresh now. Tools for package owners.