Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataResult ¶
type DataResult struct { Status promhttputil.Status `json:"status"` Data promhttputil.QueryData `json:"data"` ErrorType promhttputil.ErrorType `json:"errorType,omitempty"` Error string `json:"error,omitempty"` }
func GetData ¶
func GetData(ctx context.Context, url string, client *http.Client, labelset model.LabelSet) (*DataResult, error)
HTTP client for prometheus
func (*DataResult) UnmarshalEasyJSON ¶
func (out *DataResult) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DataResult) UnmarshalJSON ¶
func (v *DataResult) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type LabelResult ¶
type LabelResult struct { Status promhttputil.Status `json:"status"` Data []model.LabelValue `json:"data"` ErrorType promhttputil.ErrorType `json:"errorType,omitempty"` Error string `json:"error,omitempty"` }
func GetValuesForLabelName ¶
func (LabelResult) MarshalEasyJSON ¶
func (v LabelResult) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (LabelResult) MarshalJSON ¶
func (v LabelResult) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*LabelResult) Merge ¶
func (l *LabelResult) Merge(o *LabelResult) error
func (*LabelResult) UnmarshalEasyJSON ¶
func (v *LabelResult) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LabelResult) UnmarshalJSON ¶
func (v *LabelResult) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SeriesIterator ¶
type SeriesIterator struct { V interface{} // contains filtered or unexported fields }
func IteratorsForValue ¶
func IteratorsForValue(v model.Value) []*SeriesIterator
func NewSeriesIterator ¶
func NewSeriesIterator(v interface{}) *SeriesIterator
NewSeriesIterator return a series iterator for the given value TODO: error return if the type is incorrect?
func (*SeriesIterator) At ¶ added in v0.0.2
func (s *SeriesIterator) At() (t int64, v float64)
At returns the current timestamp/value pair.
func (*SeriesIterator) Err ¶ added in v0.0.2
func (s *SeriesIterator) Err() error
Err returns the current error.
func (*SeriesIterator) Labels ¶ added in v0.0.2
func (s *SeriesIterator) Labels() labels.Labels
Returns the metric of the series that the iterator corresponds to.
func (*SeriesIterator) Next ¶ added in v0.0.2
func (s *SeriesIterator) Next() bool
Next advances the iterator by one.
func (*SeriesIterator) Seek ¶ added in v0.0.2
func (s *SeriesIterator) Seek(t int64) bool
Seek advances the iterator forward to the value at or after the given timestamp.
type SeriesResult ¶
type SeriesResult struct { Status promhttputil.Status `json:"status"` Data []model.LabelSet `json:"data"` ErrorType promhttputil.ErrorType `json:"errorType,omitempty"` Error string `json:"error,omitempty"` }
func (SeriesResult) MarshalEasyJSON ¶
func (v SeriesResult) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SeriesResult) MarshalJSON ¶
func (v SeriesResult) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SeriesResult) Merge ¶
func (s *SeriesResult) Merge(o *SeriesResult) error
func (*SeriesResult) UnmarshalEasyJSON ¶
func (v *SeriesResult) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SeriesResult) UnmarshalJSON ¶
func (v *SeriesResult) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface