models

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: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CCacheDelete

type CCacheDelete struct {
	// patterns with name globbing
	Patterns []string `json:"patterns" form:"patterns" `
	// tag expressions to select series
	Expr      []string `json:"expr" form:"expr"`
	OrgId     uint32   `json:"orgId" form:"orgId" binding:"Required"`
	Propagate bool     `json:"propagate" form:"propagate"`
}

func (CCacheDelete) Trace

func (cd CCacheDelete) Trace(span opentracing.Span)

func (CCacheDelete) TraceDebug

func (cd CCacheDelete) TraceDebug(span opentracing.Span)

type CCacheDeleteResp

type CCacheDeleteResp struct {
	Errors          int                         `json:"errors"`
	FirstError      string                      `json:"firstError"`
	DeletedSeries   int                         `json:"deletedSeries"`
	DeletedArchives int                         `json:"deletedArchives"`
	Peers           map[string]CCacheDeleteResp `json:"peers"`
}

func (*CCacheDeleteResp) AddError

func (c *CCacheDeleteResp) AddError(err error)

type ClusterMembers

type ClusterMembers struct {
	Members []string `json:"members"`
}

type ClusterMembersResp

type ClusterMembersResp struct {
	Status       string `json:"status"`
	MembersAdded int    `json:"membersAdded"`
}

type ClusterStatus

type ClusterStatus struct {
	ClusterName string         `json:"clusterName"`
	NodeName    string         `json:"nodeName"`
	Members     []cluster.Node `json:"members"`
}

type FromTo

type FromTo struct {
	From  string `json:"from" form:"from"`
	Until string `json:"until" form:"until"`
	To    string `json:"to" form:"to"` // graphite uses 'until' but we allow to alternatively cause it's shorter
	Tz    string `json:"tz" form:"tz"`
}

type GetData

type GetData struct {
	Requests []Req `json:"requests" binding:"Required"`
}

func (GetData) Trace

func (g GetData) Trace(span opentracing.Span)

func (GetData) TraceDebug

func (g GetData) TraceDebug(span opentracing.Span)

type GetDataResp

type GetDataResp struct {
	Series []Series
}

func (*GetDataResp) DecodeMsg

func (z *GetDataResp) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*GetDataResp) EncodeMsg

func (z *GetDataResp) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*GetDataResp) MarshalMsg

func (z *GetDataResp) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*GetDataResp) Msgsize

func (z *GetDataResp) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*GetDataResp) UnmarshalMsg

func (z *GetDataResp) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type GraphiteAutoCompleteTagValues

type GraphiteAutoCompleteTagValues struct {
	Tag    string   `json:"tag" form:"tag"`
	Prefix string   `json:"valuePrefix" form:"valuePrefix"`
	Expr   []string `json:"expr" form:"expr"`
	From   int64    `json:"from" form:"from"`
	Limit  uint     `json:"limit" form:"limit"`
}

type GraphiteAutoCompleteTags

type GraphiteAutoCompleteTags struct {
	Prefix string   `json:"tagPrefix" form:"tagPrefix"`
	Expr   []string `json:"expr" form:"expr"`
	From   int64    `json:"from" form:"from"`
	Limit  uint     `json:"limit" form:"limit"`
}

type GraphiteFind

type GraphiteFind struct {
	FromTo
	Query  string `json:"query" form:"query" binding:"Required"`
	Format string `json:"format" form:"format" binding:"In(,completer,json,treejson,msgpack,pickle)"`
	Jsonp  string `json:"jsonp" form:"jsonp"`
}

type GraphiteRender

type GraphiteRender struct {
	FromTo
	MaxDataPoints uint32   `json:"maxDataPoints" form:"maxDataPoints" binding:"Default(800)"`
	Targets       []string `json:"target" form:"target"`
	TargetsRails  []string `form:"target[]"` // # Rails/PHP/jQuery common practice format: ?target[]=path.1&target[]=path.2 -> like graphite, we allow this.
	Format        string   `json:"format" form:"format" binding:"In(,json,msgp,msgpack,pickle)"`
	NoProxy       bool     `json:"local" form:"local"` //this is set to true by graphite-web when it passes request to cluster servers
	Meta          bool     `json:"meta" form:"meta"`   // request for meta data, which will be returned as long as the format is compatible (json) and we don't have to go via graphite
	Process       string   `json:"process" form:"process" binding:"In(,none,stable,any);Default(stable)"`
}

func (GraphiteRender) Validate

func (gr GraphiteRender) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors

type GraphiteTagDelSeries

type GraphiteTagDelSeries struct {
	Paths     []string `json:"path" form:"path"`
	Propagate bool     `json:"propagate" form:"propagate" binding:"Default(true)"`
}

func (*GraphiteTagDelSeries) DecodeMsg

func (z *GraphiteTagDelSeries) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*GraphiteTagDelSeries) EncodeMsg

func (z *GraphiteTagDelSeries) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*GraphiteTagDelSeries) MarshalMsg

func (z *GraphiteTagDelSeries) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*GraphiteTagDelSeries) Msgsize

func (z *GraphiteTagDelSeries) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (GraphiteTagDelSeries) Trace

func (g GraphiteTagDelSeries) Trace(span opentracing.Span)

func (GraphiteTagDelSeries) TraceDebug

func (g GraphiteTagDelSeries) TraceDebug(span opentracing.Span)

func (*GraphiteTagDelSeries) UnmarshalMsg

func (z *GraphiteTagDelSeries) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type GraphiteTagDelSeriesResp

type GraphiteTagDelSeriesResp struct {
	Count int            `json:"count"`
	Peers map[string]int `json:"peers"`
}

func (*GraphiteTagDelSeriesResp) DecodeMsg

func (z *GraphiteTagDelSeriesResp) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*GraphiteTagDelSeriesResp) EncodeMsg

func (z *GraphiteTagDelSeriesResp) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*GraphiteTagDelSeriesResp) MarshalMsg

func (z *GraphiteTagDelSeriesResp) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*GraphiteTagDelSeriesResp) Msgsize

func (z *GraphiteTagDelSeriesResp) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*GraphiteTagDelSeriesResp) UnmarshalMsg

func (z *GraphiteTagDelSeriesResp) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type GraphiteTagDetails

type GraphiteTagDetails struct {
	Tag    string `json:"tag" form:"tag"`
	Filter string `json:"filter" form:"filter"`
	From   int64  `json:"from" form:"from"`
}

type GraphiteTagDetailsResp

type GraphiteTagDetailsResp struct {
	Tag    string                        `json:"tag"`
	Values []GraphiteTagDetailsValueResp `json:"values"`
}

type GraphiteTagDetailsValueResp

type GraphiteTagDetailsValueResp struct {
	Count uint64 `json:"count"`
	Value string `json:"value"`
}

type GraphiteTagFindSeries

type GraphiteTagFindSeries struct {
	Expr []string `json:"expr" form:"expr"`
	From int64    `json:"from" form:"from"`
}

type GraphiteTagFindSeriesResp

type GraphiteTagFindSeriesResp struct {
	Series []string `json:"series"`
}

type GraphiteTagResp

type GraphiteTagResp struct {
	Tag string `json:"tag"`
}

type GraphiteTags

type GraphiteTags struct {
	Filter string `json:"filter" form:"filter"`
	From   int64  `json:"from" form:"from"`
}

type GraphiteTagsResp

type GraphiteTagsResp []GraphiteTagResp

type IndexAutoCompleteTagValues

type IndexAutoCompleteTagValues struct {
	OrgId  uint32   `json:"orgId" binding:"Required"`
	Tag    string   `json:"tag"`
	Prefix string   `json:"prefix"`
	Expr   []string `json:"expressions"`
	From   int64    `json:"from"`
	Limit  uint     `json:"limit"`
}

func (IndexAutoCompleteTagValues) Trace

func (IndexAutoCompleteTagValues) TraceDebug

func (i IndexAutoCompleteTagValues) TraceDebug(span opentracing.Span)

type IndexAutoCompleteTags

type IndexAutoCompleteTags struct {
	OrgId  uint32   `json:"orgId" binding:"Required"`
	Prefix string   `json:"Prefix"`
	Expr   []string `json:"expressions"`
	From   int64    `json:"from"`
	Limit  uint     `json:"limit"`
}

func (IndexAutoCompleteTags) Trace

func (t IndexAutoCompleteTags) Trace(span opentracing.Span)

func (IndexAutoCompleteTags) TraceDebug

func (i IndexAutoCompleteTags) TraceDebug(span opentracing.Span)

type IndexDelete

type IndexDelete struct {
	Query string `json:"query" form:"query" binding:"Required"`
	OrgId uint32 `json:"orgId" form:"orgId" binding:"Required"`
}

func (IndexDelete) Trace

func (i IndexDelete) Trace(span opentracing.Span)

func (IndexDelete) TraceDebug

func (i IndexDelete) TraceDebug(span opentracing.Span)

type IndexFind

type IndexFind struct {
	Patterns []string `json:"patterns" form:"patterns" binding:"Required"`
	OrgId    uint32   `json:"orgId" form:"orgId" binding:"Required"`
	From     int64    `json:"from" form:"from"`
}

func (IndexFind) Trace

func (i IndexFind) Trace(span opentracing.Span)

func (IndexFind) TraceDebug

func (i IndexFind) TraceDebug(span opentracing.Span)

type IndexFindByTag

type IndexFindByTag struct {
	OrgId uint32   `json:"orgId" binding:"Required"`
	Expr  []string `json:"expressions"`
	From  int64    `json:"from"`
}

func (IndexFindByTag) Trace

func (t IndexFindByTag) Trace(span opentracing.Span)

func (IndexFindByTag) TraceDebug

func (i IndexFindByTag) TraceDebug(span opentracing.Span)

type IndexFindByTagResp

type IndexFindByTagResp struct {
	Metrics []idx.Node `json:"metrics"`
}

func (*IndexFindByTagResp) DecodeMsg

func (z *IndexFindByTagResp) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*IndexFindByTagResp) EncodeMsg

func (z *IndexFindByTagResp) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*IndexFindByTagResp) MarshalMsg

func (z *IndexFindByTagResp) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*IndexFindByTagResp) Msgsize

func (z *IndexFindByTagResp) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*IndexFindByTagResp) UnmarshalMsg

func (z *IndexFindByTagResp) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type IndexFindResp

type IndexFindResp struct {
	Nodes map[string][]idx.Node
}

func NewIndexFindResp

func NewIndexFindResp() *IndexFindResp

func (*IndexFindResp) DecodeMsg

func (z *IndexFindResp) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*IndexFindResp) EncodeMsg

func (z *IndexFindResp) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*IndexFindResp) MarshalMsg

func (z *IndexFindResp) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*IndexFindResp) Msgsize

func (z *IndexFindResp) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*IndexFindResp) UnmarshalMsg

func (z *IndexFindResp) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type IndexGet

type IndexGet struct {
	MKey schema.MKey `json:"id" form:"id" binding:"Required"`
}

type IndexList

type IndexList struct {
	OrgId uint32 `json:"orgId" form:"orgId" binding:"Required"`
}

func (IndexList) Trace

func (i IndexList) Trace(span opentracing.Span)

func (IndexList) TraceDebug

func (i IndexList) TraceDebug(span opentracing.Span)

type IndexMetaTagRecordUpsert

type IndexMetaTagRecordUpsert struct {
	OrgId    uint32   `json:"orgId" binding:"Required"`
	MetaTags []string `json:"metaTags" binding:"Required"`
	Queries  []string `json:"queries" binding:"Required"`
}

func (*IndexMetaTagRecordUpsert) DecodeMsg

func (z *IndexMetaTagRecordUpsert) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*IndexMetaTagRecordUpsert) EncodeMsg

func (z *IndexMetaTagRecordUpsert) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*IndexMetaTagRecordUpsert) MarshalMsg

func (z *IndexMetaTagRecordUpsert) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*IndexMetaTagRecordUpsert) Msgsize

func (z *IndexMetaTagRecordUpsert) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (IndexMetaTagRecordUpsert) Trace

func (IndexMetaTagRecordUpsert) TraceDebug

func (m IndexMetaTagRecordUpsert) TraceDebug(span opentracing.Span)

func (*IndexMetaTagRecordUpsert) UnmarshalMsg

func (z *IndexMetaTagRecordUpsert) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type IndexTagDelSeries

type IndexTagDelSeries struct {
	OrgId uint32   `json:"orgId" binding:"Required"`
	Paths []string `json:"path" form:"path"`
}

func (IndexTagDelSeries) Trace

func (t IndexTagDelSeries) Trace(span opentracing.Span)

func (IndexTagDelSeries) TraceDebug

func (i IndexTagDelSeries) TraceDebug(span opentracing.Span)

type IndexTagDelSeriesResp

type IndexTagDelSeriesResp struct {
	Count int
}

func (*IndexTagDelSeriesResp) DecodeMsg

func (z *IndexTagDelSeriesResp) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (IndexTagDelSeriesResp) EncodeMsg

func (z IndexTagDelSeriesResp) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (IndexTagDelSeriesResp) MarshalMsg

func (z IndexTagDelSeriesResp) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (IndexTagDelSeriesResp) Msgsize

func (z IndexTagDelSeriesResp) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*IndexTagDelSeriesResp) UnmarshalMsg

func (z *IndexTagDelSeriesResp) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type IndexTagDetails

type IndexTagDetails struct {
	OrgId  uint32 `json:"orgId" binding:"Required"`
	Filter string `json:"filter"`
	Tag    string `json:"tag" binding:"Required"`
	From   int64  `json:"from"`
}

func (IndexTagDetails) Trace

func (t IndexTagDetails) Trace(span opentracing.Span)

func (IndexTagDetails) TraceDebug

func (i IndexTagDetails) TraceDebug(span opentracing.Span)

type IndexTagDetailsResp

type IndexTagDetailsResp struct {
	Values map[string]uint64 `json:"values"`
}

func (*IndexTagDetailsResp) DecodeMsg

func (z *IndexTagDetailsResp) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*IndexTagDetailsResp) EncodeMsg

func (z *IndexTagDetailsResp) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*IndexTagDetailsResp) MarshalMsg

func (z *IndexTagDetailsResp) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*IndexTagDetailsResp) Msgsize

func (z *IndexTagDetailsResp) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*IndexTagDetailsResp) UnmarshalMsg

func (z *IndexTagDetailsResp) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type IndexTags

type IndexTags struct {
	OrgId  uint32 `json:"orgId" binding:"Required"`
	Filter string `json:"filter"`
	From   int64  `json:"from"`
}

func (IndexTags) Trace

func (t IndexTags) Trace(span opentracing.Span)

func (IndexTags) TraceDebug

func (i IndexTags) TraceDebug(span opentracing.Span)

type IndexTagsResp

type IndexTagsResp struct {
	Tags []string `json:"tags"`
}

func (*IndexTagsResp) DecodeMsg

func (z *IndexTagsResp) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*IndexTagsResp) EncodeMsg

func (z *IndexTagsResp) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*IndexTagsResp) MarshalMsg

func (z *IndexTagsResp) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*IndexTagsResp) Msgsize

func (z *IndexTagsResp) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*IndexTagsResp) UnmarshalMsg

func (z *IndexTagsResp) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MetaTagRecordUpsert

type MetaTagRecordUpsert struct {
	MetaTags  []string `json:"metaTags" binding:"Required"`
	Queries   []string `json:"queries" binding:"Required"`
	Propagate bool     `json:"propagate"`
}

func (*MetaTagRecordUpsert) DecodeMsg

func (z *MetaTagRecordUpsert) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MetaTagRecordUpsert) EncodeMsg

func (z *MetaTagRecordUpsert) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MetaTagRecordUpsert) MarshalMsg

func (z *MetaTagRecordUpsert) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MetaTagRecordUpsert) Msgsize

func (z *MetaTagRecordUpsert) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (MetaTagRecordUpsert) Trace

func (m MetaTagRecordUpsert) Trace(span opentracing.Span)

func (MetaTagRecordUpsert) TraceDebug

func (m MetaTagRecordUpsert) TraceDebug(span opentracing.Span)

func (*MetaTagRecordUpsert) UnmarshalMsg

func (z *MetaTagRecordUpsert) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MetaTagRecordUpsertResult

type MetaTagRecordUpsertResult struct {
	MetaTags []string `json:"metaTags"`
	Queries  []string `json:"queries"`
	Created  bool     `json:"created"`
}

func (*MetaTagRecordUpsertResult) DecodeMsg

func (z *MetaTagRecordUpsertResult) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MetaTagRecordUpsertResult) EncodeMsg

func (z *MetaTagRecordUpsertResult) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MetaTagRecordUpsertResult) MarshalMsg

func (z *MetaTagRecordUpsertResult) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MetaTagRecordUpsertResult) Msgsize

func (z *MetaTagRecordUpsertResult) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MetaTagRecordUpsertResult) UnmarshalMsg

func (z *MetaTagRecordUpsertResult) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MetaTagRecordUpsertResultByNode

type MetaTagRecordUpsertResultByNode struct {
	Local       MetaTagRecordUpsertResult
	PeerResults map[string]MetaTagRecordUpsertResult `json:"peerResults"`
	PeerErrors  map[string]string                    `json:"peerErrors"`
}

func (*MetaTagRecordUpsertResultByNode) DecodeMsg

func (z *MetaTagRecordUpsertResultByNode) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MetaTagRecordUpsertResultByNode) EncodeMsg

func (z *MetaTagRecordUpsertResultByNode) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MetaTagRecordUpsertResultByNode) MarshalMsg

func (z *MetaTagRecordUpsertResultByNode) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MetaTagRecordUpsertResultByNode) Msgsize

func (z *MetaTagRecordUpsertResultByNode) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MetaTagRecordUpsertResultByNode) UnmarshalMsg

func (z *MetaTagRecordUpsertResultByNode) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MetricNames

type MetricNames []idx.Archive

func (MetricNames) MarshalJSON

func (defs MetricNames) MarshalJSON() ([]byte, error)

func (MetricNames) MarshalJSONFast

func (defs MetricNames) MarshalJSONFast(b []byte) ([]byte, error)

type MetricsDelete

type MetricsDelete struct {
	Query string `json:"query" form:"query" binding:"Required"`
}

type MetricsDeleteResp

type MetricsDeleteResp struct {
	DeletedDefs int `json:"deletedDefs"`
}

func (*MetricsDeleteResp) DecodeMsg

func (z *MetricsDeleteResp) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (MetricsDeleteResp) EncodeMsg

func (z MetricsDeleteResp) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (MetricsDeleteResp) MarshalMsg

func (z MetricsDeleteResp) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (MetricsDeleteResp) Msgsize

func (z MetricsDeleteResp) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MetricsDeleteResp) UnmarshalMsg

func (z *MetricsDeleteResp) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type NodeStatus

type NodeStatus struct {
	Primary string `json:"primary" form:"primary" binding:"Required"`
}

type PrometheusQueryInstant

type PrometheusQueryInstant struct {
	Query   string `form:"query"`   //<string>: Prometheus expression query string.
	Time    string `form:"time"`    //<rfc3339 | unix_timestamp>: Start timestamp.
	Timeout string `form:"timeout"` //<duration>: Evaluation timeout. Optional. Defaults to and is capped by the value of the -query.timeout flag.
}

type PrometheusRangeQuery

type PrometheusRangeQuery struct {
	Query   string `form:"query"`   //<string>: Prometheus expression query string.
	Start   string `form:"start"`   //<rfc3339 | unix_timestamp>: Start timestamp.
	End     string `form:"end"`     //<rfc3339 | unix_timestamp>: End timestamp.
	Step    string `form:"step"`    //<duration>: Query resolution step width.
	Timeout string `form:"timeout"` //<duration>: Evaluation timeout. Optional. Defaults to and is capped by the value of the -query.timeout flag.
}

type PrometheusSeries

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

func NewPrometheusSeries

func NewPrometheusSeries(tags map[string]string, samples []model.SamplePair) *PrometheusSeries

func (*PrometheusSeries) Iterator

func (p *PrometheusSeries) Iterator() storage.SeriesIterator

func (*PrometheusSeries) Labels

func (p *PrometheusSeries) Labels() labels.Labels

type PrometheusSeriesIterator

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

func (*PrometheusSeriesIterator) At

func (c *PrometheusSeriesIterator) At() (t int64, v float64)

func (*PrometheusSeriesIterator) Err

func (*PrometheusSeriesIterator) Next

func (c *PrometheusSeriesIterator) Next() bool

func (*PrometheusSeriesIterator) Seek

func (c *PrometheusSeriesIterator) Seek(t int64) bool

type PrometheusSeriesQuery

type PrometheusSeriesQuery struct {
	Match []string `form:"match[]"` //<string>: Prometheus expression query string.
	Start string   `form:"start"`   //<rfc3339 | unix_timestamp>: Start timestamp.
	End   string   `form:"end"`     //<rfc3339 | unix_timestamp>: End timestamp.
}

type PrometheusSeriesSet

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

func NewPrometheusSeriesSet

func NewPrometheusSeriesSet(series []storage.Series) *PrometheusSeriesSet

func (*PrometheusSeriesSet) At

func (*PrometheusSeriesSet) Err

func (p *PrometheusSeriesSet) Err() error

func (*PrometheusSeriesSet) Next

func (p *PrometheusSeriesSet) Next() bool

type RenderMeta

type RenderMeta struct {
	Stats stats
}

RenderMeta holds metadata about a render request/response

func (RenderMeta) MarshalJSONFast

func (rm RenderMeta) MarshalJSONFast(b []byte) ([]byte, error)

type Req

type Req struct {
	// these fields can be set straight away:
	MKey         schema.MKey                `json:"key"`     // metric key aka metric definition id (orgid.<hash>), often same as target for graphite-metrictank requests
	Target       string                     `json:"target"`  // the target we should return either to graphite or as if we're graphite.  simply the graphite metric key from the index
	Pattern      string                     `json:"pattern"` // the original query pattern specified by user (not wrapped by any functions). e.g. `foo.b*`. To be able to tie the result data back to the data need as requested
	From         uint32                     `json:"from"`
	To           uint32                     `json:"to"`
	MaxPoints    uint32                     `json:"maxPoints"`
	RawInterval  uint32                     `json:"rawInterval"`  // the interval of the raw metric before any consolidation
	Consolidator consolidation.Consolidator `json:"consolidator"` // consolidation method for rollup archive and normalization. (not runtime consolidation)
	// requested consolidation method. could be 0 (meaning use configured default)
	// we need to make this differentiation to tie back to the original request (and we can't just fill in the concrete consolidation in the request,
	// because one request may result in multiple series with different consolidators)
	ConsReq  consolidation.Consolidator `json:"consolidator_req"`
	Node     cluster.Node               `json:"-"`
	SchemaId uint16                     `json:"schemaId"`
	AggId    uint16                     `json:"aggId"`

	// these fields need some more coordination and are typically set later
	Archive      int    `json:"archive"`      // 0 means original data, 1 means first agg level, 2 means 2nd, etc.
	ArchInterval uint32 `json:"archInterval"` // the interval corresponding to the archive we'll fetch
	TTL          uint32 `json:"ttl"`          // the ttl of the archive we'll fetch
	OutInterval  uint32 `json:"outInterval"`  // the interval of the output data, after any runtime consolidation
	AggNum       uint32 `json:"aggNum"`       // how many points to consolidate together at runtime, after fetching from the archive
}

Req is a request for data by MKey and parameters such as consolidator, max points, etc

func NewReq

func NewReq(key schema.MKey, target, patt string, from, to, maxPoints, rawInterval uint32, cons, consReq consolidation.Consolidator, node cluster.Node, schemaId, aggId uint16) Req

func (Req) DebugString

func (r Req) DebugString() string

func (Req) Equals

func (a Req) Equals(b Req) bool

Equals compares all fields of a to b for equality. Except

  • TTL (because alignRequests may change it) for 100% correctness we may want to fix this in the future but for now, should be harmless since the field is not that important for archive fetching
  • For the Node field we just compare the node.Name

rather then doing a deep comparison.

func (Req) String

func (r Req) String() string

func (Req) Trace

func (r Req) Trace(span opentracing.Span)

Trace puts all request properties as tags in a span good for when a span deals with 1 request

func (Req) TraceLog

func (r Req) TraceLog(span opentracing.Span)

TraceLog puts all request properties in a span log entry good for when a span deals with multiple requests note that the amount of data generated here can be up to 1000~1500 bytes

type ResponseWithMeta

type ResponseWithMeta struct {
	Meta   RenderMeta
	Series SeriesByTarget
}

ResponseWithMeta is a graphite render response with metadata

func (ResponseWithMeta) MarshalJSONFast

func (rwm ResponseWithMeta) MarshalJSONFast(b []byte) ([]byte, error)

type Series

type Series struct {
	Target       string // for fetched data, set from models.Req.Target, i.e. the metric graphite key. for function output, whatever should be shown as target string (legend)
	Datapoints   []schema.Point
	Tags         map[string]string // Must be set initially via call to `SetTags()`
	Interval     uint32
	QueryPatt    string                     // to tie series back to request it came from. e.g. foo.bar.*, or if series outputted by func it would be e.g. scale(foo.bar.*,0.123456)
	QueryFrom    uint32                     // to tie series back to request it came from
	QueryTo      uint32                     // to tie series back to request it came from
	QueryCons    consolidation.Consolidator // to tie series back to request it came from (may be 0 to mean use configured default)
	Consolidator consolidation.Consolidator // consolidator to actually use (for fetched series this may not be 0, default must be resolved. if series created by function, may be 0)
}

func (Series) Copy

func (s Series) Copy(emptyDatapoints []schema.Point) Series

func (*Series) DecodeMsg

func (z *Series) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Series) EncodeMsg

func (z *Series) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Series) MarshalMsg

func (z *Series) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Series) Msgsize

func (z *Series) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Series) SetTags

func (s *Series) SetTags()

func (*Series) UnmarshalMsg

func (z *Series) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SeriesByTarget

type SeriesByTarget []Series

func (*SeriesByTarget) DecodeMsg

func (z *SeriesByTarget) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (SeriesByTarget) EncodeMsg

func (z SeriesByTarget) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (SeriesByTarget) ForGraphite

func (series SeriesByTarget) ForGraphite(format string) SeriesListForPickle

func (SeriesByTarget) Len

func (g SeriesByTarget) Len() int

func (SeriesByTarget) Less

func (g SeriesByTarget) Less(i, j int) bool

func (SeriesByTarget) MarshalJSON

func (series SeriesByTarget) MarshalJSON() ([]byte, error)

func (SeriesByTarget) MarshalJSONFast

func (series SeriesByTarget) MarshalJSONFast(b []byte) ([]byte, error)

regular graphite output

func (SeriesByTarget) MarshalMsg

func (z SeriesByTarget) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (SeriesByTarget) Msgsize

func (z SeriesByTarget) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (SeriesByTarget) Pickle

func (series SeriesByTarget) Pickle(buf []byte) ([]byte, error)

func (SeriesByTarget) Swap

func (g SeriesByTarget) Swap(i, j int)

func (*SeriesByTarget) UnmarshalMsg

func (z *SeriesByTarget) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SeriesCompleter

type SeriesCompleter map[string][]SeriesCompleterItem

func NewSeriesCompleter

func NewSeriesCompleter() SeriesCompleter

func (SeriesCompleter) Add

type SeriesCompleterItem

type SeriesCompleterItem struct {
	Path   string `json:"path"`
	Name   string `json:"name"`
	IsLeaf string `json:"is_leaf"`
}

type SeriesForPickle

type SeriesForPickle struct {
	Name           string        `pickle:"name" msg:"name"`
	Start          uint32        `pickle:"start" msg:"start"`
	End            uint32        `pickle:"end" msg:"end"`
	Step           uint32        `pickle:"step" msg:"step"`
	Values         []interface{} `pickle:"values" msg:"values"`
	PathExpression string        `pickle:"pathExpression" msg:"pathExpression"`
}

func (*SeriesForPickle) DecodeMsg

func (z *SeriesForPickle) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*SeriesForPickle) EncodeMsg

func (z *SeriesForPickle) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*SeriesForPickle) MarshalMsg

func (z *SeriesForPickle) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*SeriesForPickle) Msgsize

func (z *SeriesForPickle) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SeriesForPickle) UnmarshalMsg

func (z *SeriesForPickle) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SeriesListForPickle

type SeriesListForPickle []SeriesForPickle

func (*SeriesListForPickle) DecodeMsg

func (z *SeriesListForPickle) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (SeriesListForPickle) EncodeMsg

func (z SeriesListForPickle) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (SeriesListForPickle) MarshalMsg

func (z SeriesListForPickle) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (SeriesListForPickle) Msgsize

func (z SeriesListForPickle) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SeriesListForPickle) UnmarshalMsg

func (z *SeriesListForPickle) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SeriesPickle

type SeriesPickle []SeriesPickleItem

func (*SeriesPickle) DecodeMsg

func (z *SeriesPickle) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (SeriesPickle) EncodeMsg

func (z SeriesPickle) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (SeriesPickle) MarshalMsg

func (z SeriesPickle) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (SeriesPickle) Msgsize

func (z SeriesPickle) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (SeriesPickle) Pickle

func (s SeriesPickle) Pickle(buf []byte) ([]byte, error)

func (*SeriesPickle) UnmarshalMsg

func (z *SeriesPickle) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SeriesPickleItem

type SeriesPickleItem struct {
	Path      string    `pickle:"path" msg:"path"`
	IsLeaf    bool      `pickle:"isLeaf" msg:"isLeaf"`
	Intervals [][]int64 `pickle:"intervals" msg:"intervals"` // list of (start,end) tuples
}

func NewSeriesPickleItem

func NewSeriesPickleItem(path string, isLeaf bool, intervals [][]int64) SeriesPickleItem

func (*SeriesPickleItem) DecodeMsg

func (z *SeriesPickleItem) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*SeriesPickleItem) EncodeMsg

func (z *SeriesPickleItem) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*SeriesPickleItem) MarshalMsg

func (z *SeriesPickleItem) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*SeriesPickleItem) Msgsize

func (z *SeriesPickleItem) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SeriesPickleItem) UnmarshalMsg

func (z *SeriesPickleItem) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SeriesTree

type SeriesTree []SeriesTreeItem

func NewSeriesTree

func NewSeriesTree() *SeriesTree

func (*SeriesTree) Add

func (s *SeriesTree) Add(i *SeriesTreeItem)

type SeriesTreeItem

type SeriesTreeItem struct {
	AllowChildren int            `json:"allowChildren"`
	Expandable    int            `json:"expandable"`
	Leaf          int            `json:"leaf"`
	ID            string         `json:"id"`
	Text          string         `json:"text"`
	Context       map[string]int `json:"context"` // unused
}

type StringList

type StringList []string

func (*StringList) DecodeMsg

func (z *StringList) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (StringList) EncodeMsg

func (z StringList) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (StringList) MarshalMsg

func (z StringList) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (StringList) Msgsize

func (z StringList) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*StringList) UnmarshalMsg

func (z *StringList) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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