Documentation ¶
Index ¶
- func AllPostingsKey() (name, value string)
- func DefaultEngineOptions(timeout time.Duration, maxSamples int) promql.EngineOpts
- func NewRangeStorage() *rangeStorage
- func NewUnorderedmemPostings() *memPostings
- func NewmemPostings() *memPostings
- func PlainMarshal(value promql.Value) ([]byte, error)
- func PromTimestamp(normalTime time.Time) int64
- func ToPlain(result *promql.Result) (*string, error)
- func ToPrettyColoredJson(result *promql.Result) (*string, error)
- func ToPrettyFormat(res *promql.Result, outputType string, colorized bool) (*string, error)
- func ToPrettyJson(result *promql.Result) (*string, error)
- func ToYaml(result *promql.Result) (*string, error)
- type DataSource
- type Indexer
- type ParsedSeries
- type PeriodicData
- type Range
- type ResultsCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllPostingsKey ¶
func AllPostingsKey() (name, value string)
AllPostingsKey returns the label key that is used to store the postings list of all existing IDs.
func DefaultEngineOptions ¶
func DefaultEngineOptions(timeout time.Duration, maxSamples int) promql.EngineOpts
func NewRangeStorage ¶
func NewRangeStorage() *rangeStorage
func NewUnorderedmemPostings ¶
func NewUnorderedmemPostings() *memPostings
NewUnorderedmemPostings returns a memPostings that is not safe to be read from until ensureOrder was called once.
func NewmemPostings ¶
func NewmemPostings() *memPostings
NewmemPostings returns a memPostings that's ready for reads and writes.
func PromTimestamp ¶
func ToPrettyFormat ¶
Types ¶
type DataSource ¶
type Indexer ¶
type ParsedSeries ¶
func ParseTextData ¶
func ParseTextData(data []byte, nowish time.Time) ([]ParsedSeries, error)
type PeriodicData ¶
type PeriodicData struct { Callback ResultsCallback Query string Times Range // contains filtered or unexported fields }
func NewPeriodicData ¶
func NewPeriodicData(source DataSource, opts promql.EngineOpts) *PeriodicData
func (*PeriodicData) GetIndex ¶
func (q *PeriodicData) GetIndex() Indexer
func (*PeriodicData) ManuallyExecuteQuery ¶
func (q *PeriodicData) ManuallyExecuteQuery(ctx context.Context, cb ResultsCallback) error
type ResultsCallback ¶
ResultsCallback is a function that processes the results of a prometheus query The given results are *only* valid for the life of the query, and must be deep-copied if they are kept around.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.