Documentation ¶
Overview ¶
Package promproxy provides Prometheus proxy for observability and research.
Index ¶
- type InstantQuery
- func (s *InstantQuery) Decode(d *jx.Decoder) error
- func (s *InstantQuery) Encode(e *jx.Encoder)
- func (s *InstantQuery) GetDescription() OptString
- func (s *InstantQuery) GetQuery() string
- func (s *InstantQuery) GetTime() OptDateTime
- func (s *InstantQuery) GetTitle() OptString
- func (s *InstantQuery) MarshalJSON() ([]byte, error)
- func (s *InstantQuery) SetDescription(val OptString)
- func (s *InstantQuery) SetQuery(val string)
- func (s *InstantQuery) SetTime(val OptDateTime)
- func (s *InstantQuery) SetTitle(val OptString)
- func (s *InstantQuery) UnmarshalJSON(data []byte) error
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) UnmarshalJSON(data []byte) error
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Query
- func (s *Query) Decode(d *jx.Decoder) error
- func (s Query) Encode(e *jx.Encoder)
- func (s Query) GetInstantQuery() (v InstantQuery, ok bool)
- func (s Query) GetRangeQuery() (v RangeQuery, ok bool)
- func (s Query) GetSeriesQuery() (v SeriesQuery, ok bool)
- func (s Query) IsInstantQuery() bool
- func (s Query) IsRangeQuery() bool
- func (s Query) IsSeriesQuery() bool
- func (s Query) MarshalJSON() ([]byte, error)
- func (s *Query) SetInstantQuery(v InstantQuery)
- func (s *Query) SetRangeQuery(v RangeQuery)
- func (s *Query) SetSeriesQuery(v SeriesQuery)
- func (s *Query) UnmarshalJSON(data []byte) error
- func (s Query) Validate() error
- type QueryType
- type RangeQuery
- func (s *RangeQuery) Decode(d *jx.Decoder) error
- func (s *RangeQuery) Encode(e *jx.Encoder)
- func (s *RangeQuery) GetDescription() OptString
- func (s *RangeQuery) GetEnd() OptDateTime
- func (s *RangeQuery) GetQuery() string
- func (s *RangeQuery) GetStart() OptDateTime
- func (s *RangeQuery) GetStep() OptInt
- func (s *RangeQuery) GetTitle() OptString
- func (s *RangeQuery) MarshalJSON() ([]byte, error)
- func (s *RangeQuery) SetDescription(val OptString)
- func (s *RangeQuery) SetEnd(val OptDateTime)
- func (s *RangeQuery) SetQuery(val string)
- func (s *RangeQuery) SetStart(val OptDateTime)
- func (s *RangeQuery) SetStep(val OptInt)
- func (s *RangeQuery) SetTitle(val OptString)
- func (s *RangeQuery) UnmarshalJSON(data []byte) error
- type Record
- func (s *Record) Decode(d *jx.Decoder) error
- func (s *Record) Encode(e *jx.Encoder)
- func (s *Record) GetEnd() OptDateTime
- func (s *Record) GetInstant() []InstantQuery
- func (s *Record) GetQueries() []Query
- func (s *Record) GetRange() []RangeQuery
- func (s *Record) GetSeries() []SeriesQuery
- func (s *Record) GetStart() OptDateTime
- func (s *Record) GetStep() OptInt
- func (s *Record) MarshalJSON() ([]byte, error)
- func (s *Record) SetEnd(val OptDateTime)
- func (s *Record) SetInstant(val []InstantQuery)
- func (s *Record) SetQueries(val []Query)
- func (s *Record) SetRange(val []RangeQuery)
- func (s *Record) SetSeries(val []SeriesQuery)
- func (s *Record) SetStart(val OptDateTime)
- func (s *Record) SetStep(val OptInt)
- func (s *Record) UnmarshalJSON(data []byte) error
- func (s *Record) Validate() error
- type Recorder
- type SeriesQuery
- func (s *SeriesQuery) Decode(d *jx.Decoder) error
- func (s *SeriesQuery) Encode(e *jx.Encoder)
- func (s *SeriesQuery) GetDescription() OptString
- func (s *SeriesQuery) GetEnd() OptDateTime
- func (s *SeriesQuery) GetMatchers() []string
- func (s *SeriesQuery) GetStart() OptDateTime
- func (s *SeriesQuery) GetTitle() OptString
- func (s *SeriesQuery) MarshalJSON() ([]byte, error)
- func (s *SeriesQuery) SetDescription(val OptString)
- func (s *SeriesQuery) SetEnd(val OptDateTime)
- func (s *SeriesQuery) SetMatchers(val []string)
- func (s *SeriesQuery) SetStart(val OptDateTime)
- func (s *SeriesQuery) SetTitle(val OptString)
- func (s *SeriesQuery) UnmarshalJSON(data []byte) error
- func (s *SeriesQuery) Validate() error
- type Server
- func (s *Server) GetLabelValues(ctx context.Context, params promapi.GetLabelValuesParams) (*promapi.LabelValuesResponse, error)
- func (s *Server) GetLabels(ctx context.Context, params promapi.GetLabelsParams) (*promapi.LabelsResponse, error)
- func (s *Server) GetMetadata(ctx context.Context, params promapi.GetMetadataParams) (*promapi.MetadataResponse, error)
- func (s *Server) GetQuery(ctx context.Context, params promapi.GetQueryParams) (*promapi.QueryResponse, error)
- func (s *Server) GetQueryExemplars(ctx context.Context, params promapi.GetQueryExemplarsParams) (*promapi.QueryExemplarsResponse, error)
- func (s *Server) GetQueryRange(ctx context.Context, params promapi.GetQueryRangeParams) (*promapi.QueryResponse, error)
- func (s *Server) GetRules(ctx context.Context, params promapi.GetRulesParams) (*promapi.RulesResponse, error)
- func (s *Server) GetSeries(ctx context.Context, params promapi.GetSeriesParams) (*promapi.SeriesResponse, error)
- func (s Server) NewError(ctx context.Context, err error) *promapi.FailStatusCode
- func (s *Server) PostLabels(ctx context.Context, req *promapi.LabelsForm) (*promapi.LabelsResponse, error)
- func (s *Server) PostQuery(ctx context.Context, req *promapi.QueryForm) (*promapi.QueryResponse, error)
- func (s *Server) PostQueryExemplars(ctx context.Context, req *promapi.ExemplarsForm) (*promapi.QueryExemplarsResponse, error)
- func (s *Server) PostQueryRange(ctx context.Context, req *promapi.QueryRangeForm) (*promapi.QueryResponse, error)
- func (s *Server) PostSeries(ctx context.Context, req *promapi.SeriesForm) (*promapi.SeriesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstantQuery ¶ added in v0.7.0
type InstantQuery struct { Query string `json:"query"` Time OptDateTime `json:"time"` Title OptString `json:"title"` Description OptString `json:"description"` }
Ref: #/definitions/instantQuery
func (*InstantQuery) Decode ¶ added in v0.7.0
func (s *InstantQuery) Decode(d *jx.Decoder) error
Decode decodes InstantQuery from json.
func (*InstantQuery) Encode ¶ added in v0.7.0
func (s *InstantQuery) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*InstantQuery) GetDescription ¶ added in v0.7.0
func (s *InstantQuery) GetDescription() OptString
GetDescription returns the value of Description.
func (*InstantQuery) GetQuery ¶ added in v0.7.0
func (s *InstantQuery) GetQuery() string
GetQuery returns the value of Query.
func (*InstantQuery) GetTime ¶ added in v0.7.0
func (s *InstantQuery) GetTime() OptDateTime
GetTime returns the value of Time.
func (*InstantQuery) GetTitle ¶ added in v0.7.0
func (s *InstantQuery) GetTitle() OptString
GetTitle returns the value of Title.
func (*InstantQuery) MarshalJSON ¶ added in v0.7.0
func (s *InstantQuery) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*InstantQuery) SetDescription ¶ added in v0.7.0
func (s *InstantQuery) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*InstantQuery) SetQuery ¶ added in v0.7.0
func (s *InstantQuery) SetQuery(val string)
SetQuery sets the value of Query.
func (*InstantQuery) SetTime ¶ added in v0.7.0
func (s *InstantQuery) SetTime(val OptDateTime)
SetTime sets the value of Time.
func (*InstantQuery) SetTitle ¶ added in v0.7.0
func (s *InstantQuery) SetTitle(val OptString)
SetTitle sets the value of Title.
func (*InstantQuery) UnmarshalJSON ¶ added in v0.7.0
func (s *InstantQuery) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptDateTime ¶ added in v0.7.0
OptDateTime is optional time.Time.
func NewOptDateTime ¶ added in v0.7.0
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func (OptDateTime) Get ¶ added in v0.7.0
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶ added in v0.7.0
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶ added in v0.7.0
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶ added in v0.7.0
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptDateTime) SetTo ¶ added in v0.7.0
func (o *OptDateTime) SetTo(v time.Time)
SetTo sets value to v.
func (*OptDateTime) UnmarshalJSON ¶ added in v0.7.0
func (s *OptDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt ¶ added in v0.7.0
OptInt is optional int.
func (OptInt) Get ¶ added in v0.7.0
Get returns value and boolean that denotes whether value was set.
func (OptInt) MarshalJSON ¶ added in v0.7.0
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶ added in v0.7.0
OptString is optional string.
func NewOptString ¶ added in v0.7.0
NewOptString returns new OptString with value set to v.
func (OptString) Get ¶ added in v0.7.0
Get returns value and boolean that denotes whether value was set.
func (OptString) MarshalJSON ¶ added in v0.7.0
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements stdjson.Unmarshaler.
type Query ¶ added in v0.7.0
type Query struct { Type QueryType // switch on this field RangeQuery RangeQuery InstantQuery InstantQuery SeriesQuery SeriesQuery }
Ref: #/definitions/query Query represents sum type.
func NewInstantQueryQuery ¶ added in v0.7.0
func NewInstantQueryQuery(v InstantQuery) Query
NewInstantQueryQuery returns new Query from InstantQuery.
func NewRangeQueryQuery ¶ added in v0.7.0
func NewRangeQueryQuery(v RangeQuery) Query
NewRangeQueryQuery returns new Query from RangeQuery.
func NewSeriesQueryQuery ¶ added in v0.7.0
func NewSeriesQueryQuery(v SeriesQuery) Query
NewSeriesQueryQuery returns new Query from SeriesQuery.
func (Query) GetInstantQuery ¶ added in v0.7.0
func (s Query) GetInstantQuery() (v InstantQuery, ok bool)
GetInstantQuery returns InstantQuery and true boolean if Query is InstantQuery.
func (Query) GetRangeQuery ¶ added in v0.7.0
func (s Query) GetRangeQuery() (v RangeQuery, ok bool)
GetRangeQuery returns RangeQuery and true boolean if Query is RangeQuery.
func (Query) GetSeriesQuery ¶ added in v0.7.0
func (s Query) GetSeriesQuery() (v SeriesQuery, ok bool)
GetSeriesQuery returns SeriesQuery and true boolean if Query is SeriesQuery.
func (Query) IsInstantQuery ¶ added in v0.7.0
IsInstantQuery reports whether Query is InstantQuery.
func (Query) IsRangeQuery ¶ added in v0.7.0
IsRangeQuery reports whether Query is RangeQuery.
func (Query) IsSeriesQuery ¶ added in v0.7.0
IsSeriesQuery reports whether Query is SeriesQuery.
func (Query) MarshalJSON ¶ added in v0.7.0
MarshalJSON implements stdjson.Marshaler.
func (*Query) SetInstantQuery ¶ added in v0.7.0
func (s *Query) SetInstantQuery(v InstantQuery)
SetInstantQuery sets Query to InstantQuery.
func (*Query) SetRangeQuery ¶ added in v0.7.0
func (s *Query) SetRangeQuery(v RangeQuery)
SetRangeQuery sets Query to RangeQuery.
func (*Query) SetSeriesQuery ¶ added in v0.7.0
func (s *Query) SetSeriesQuery(v SeriesQuery)
SetSeriesQuery sets Query to SeriesQuery.
func (*Query) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements stdjson.Unmarshaler.
type RangeQuery ¶ added in v0.7.0
type RangeQuery struct { Query string `json:"query"` Start OptDateTime `json:"start"` End OptDateTime `json:"end"` // Step in seconds. Step OptInt `json:"step"` Title OptString `json:"title"` Description OptString `json:"description"` }
Ref: #/definitions/rangeQuery
func (*RangeQuery) Decode ¶ added in v0.7.0
func (s *RangeQuery) Decode(d *jx.Decoder) error
Decode decodes RangeQuery from json.
func (*RangeQuery) Encode ¶ added in v0.7.0
func (s *RangeQuery) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*RangeQuery) GetDescription ¶ added in v0.7.0
func (s *RangeQuery) GetDescription() OptString
GetDescription returns the value of Description.
func (*RangeQuery) GetEnd ¶ added in v0.7.0
func (s *RangeQuery) GetEnd() OptDateTime
GetEnd returns the value of End.
func (*RangeQuery) GetQuery ¶ added in v0.7.0
func (s *RangeQuery) GetQuery() string
GetQuery returns the value of Query.
func (*RangeQuery) GetStart ¶ added in v0.7.0
func (s *RangeQuery) GetStart() OptDateTime
GetStart returns the value of Start.
func (*RangeQuery) GetStep ¶ added in v0.7.0
func (s *RangeQuery) GetStep() OptInt
GetStep returns the value of Step.
func (*RangeQuery) GetTitle ¶ added in v0.7.0
func (s *RangeQuery) GetTitle() OptString
GetTitle returns the value of Title.
func (*RangeQuery) MarshalJSON ¶ added in v0.7.0
func (s *RangeQuery) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*RangeQuery) SetDescription ¶ added in v0.7.0
func (s *RangeQuery) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*RangeQuery) SetEnd ¶ added in v0.7.0
func (s *RangeQuery) SetEnd(val OptDateTime)
SetEnd sets the value of End.
func (*RangeQuery) SetQuery ¶ added in v0.7.0
func (s *RangeQuery) SetQuery(val string)
SetQuery sets the value of Query.
func (*RangeQuery) SetStart ¶ added in v0.7.0
func (s *RangeQuery) SetStart(val OptDateTime)
SetStart sets the value of Start.
func (*RangeQuery) SetStep ¶ added in v0.7.0
func (s *RangeQuery) SetStep(val OptInt)
SetStep sets the value of Step.
func (*RangeQuery) SetTitle ¶ added in v0.7.0
func (s *RangeQuery) SetTitle(val OptString)
SetTitle sets the value of Title.
func (*RangeQuery) UnmarshalJSON ¶ added in v0.7.0
func (s *RangeQuery) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Record ¶ added in v0.7.0
type Record struct { Start OptDateTime `json:"start"` End OptDateTime `json:"end"` Step OptInt `json:"step"` Series []SeriesQuery `json:"series"` Instant []InstantQuery `json:"instant"` Range []RangeQuery `json:"range"` Queries []Query `json:"queries"` }
func (*Record) GetEnd ¶ added in v0.7.0
func (s *Record) GetEnd() OptDateTime
GetEnd returns the value of End.
func (*Record) GetInstant ¶ added in v0.7.0
func (s *Record) GetInstant() []InstantQuery
GetInstant returns the value of Instant.
func (*Record) GetQueries ¶ added in v0.7.0
GetQueries returns the value of Queries.
func (*Record) GetRange ¶ added in v0.7.0
func (s *Record) GetRange() []RangeQuery
GetRange returns the value of Range.
func (*Record) GetSeries ¶ added in v0.7.0
func (s *Record) GetSeries() []SeriesQuery
GetSeries returns the value of Series.
func (*Record) GetStart ¶ added in v0.7.0
func (s *Record) GetStart() OptDateTime
GetStart returns the value of Start.
func (*Record) MarshalJSON ¶ added in v0.7.0
MarshalJSON implements stdjson.Marshaler.
func (*Record) SetEnd ¶ added in v0.7.0
func (s *Record) SetEnd(val OptDateTime)
SetEnd sets the value of End.
func (*Record) SetInstant ¶ added in v0.7.0
func (s *Record) SetInstant(val []InstantQuery)
SetInstant sets the value of Instant.
func (*Record) SetQueries ¶ added in v0.7.0
SetQueries sets the value of Queries.
func (*Record) SetRange ¶ added in v0.7.0
func (s *Record) SetRange(val []RangeQuery)
SetRange sets the value of Range.
func (*Record) SetSeries ¶ added in v0.7.0
func (s *Record) SetSeries(val []SeriesQuery)
SetSeries sets the value of Series.
func (*Record) SetStart ¶ added in v0.7.0
func (s *Record) SetStart(val OptDateTime)
SetStart sets the value of Start.
func (*Record) UnmarshalJSON ¶ added in v0.7.0
UnmarshalJSON implements stdjson.Unmarshaler.
type Recorder ¶ added in v0.7.0
type Recorder struct {
// contains filtered or unexported fields
}
Recorder of prometheus queries.
func NewRecorder ¶ added in v0.7.0
NewRecorder returns new Recorder.
func (*Recorder) RecordGetQuery ¶ added in v0.7.0
func (r *Recorder) RecordGetQuery(v promapi.GetQueryParams) error
func (*Recorder) RecordGetQueryRange ¶ added in v0.7.0
func (r *Recorder) RecordGetQueryRange(v promapi.GetQueryRangeParams) error
RecordGetQueryRange records range query.
func (*Recorder) RecordSeriesQuery ¶ added in v0.7.0
func (r *Recorder) RecordSeriesQuery(v promapi.GetSeriesParams) error
type SeriesQuery ¶ added in v0.7.0
type SeriesQuery struct { Matchers []string `json:"matchers"` Start OptDateTime `json:"start"` End OptDateTime `json:"end"` Title OptString `json:"title"` Description OptString `json:"description"` }
Ref: #/definitions/seriesQuery
func (*SeriesQuery) Decode ¶ added in v0.7.0
func (s *SeriesQuery) Decode(d *jx.Decoder) error
Decode decodes SeriesQuery from json.
func (*SeriesQuery) Encode ¶ added in v0.7.0
func (s *SeriesQuery) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*SeriesQuery) GetDescription ¶ added in v0.7.0
func (s *SeriesQuery) GetDescription() OptString
GetDescription returns the value of Description.
func (*SeriesQuery) GetEnd ¶ added in v0.7.0
func (s *SeriesQuery) GetEnd() OptDateTime
GetEnd returns the value of End.
func (*SeriesQuery) GetMatchers ¶ added in v0.7.0
func (s *SeriesQuery) GetMatchers() []string
GetMatchers returns the value of Matchers.
func (*SeriesQuery) GetStart ¶ added in v0.7.0
func (s *SeriesQuery) GetStart() OptDateTime
GetStart returns the value of Start.
func (*SeriesQuery) GetTitle ¶ added in v0.7.0
func (s *SeriesQuery) GetTitle() OptString
GetTitle returns the value of Title.
func (*SeriesQuery) MarshalJSON ¶ added in v0.7.0
func (s *SeriesQuery) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*SeriesQuery) SetDescription ¶ added in v0.7.0
func (s *SeriesQuery) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*SeriesQuery) SetEnd ¶ added in v0.7.0
func (s *SeriesQuery) SetEnd(val OptDateTime)
SetEnd sets the value of End.
func (*SeriesQuery) SetMatchers ¶ added in v0.7.0
func (s *SeriesQuery) SetMatchers(val []string)
SetMatchers sets the value of Matchers.
func (*SeriesQuery) SetStart ¶ added in v0.7.0
func (s *SeriesQuery) SetStart(val OptDateTime)
SetStart sets the value of Start.
func (*SeriesQuery) SetTitle ¶ added in v0.7.0
func (s *SeriesQuery) SetTitle(val OptString)
SetTitle sets the value of Title.
func (*SeriesQuery) UnmarshalJSON ¶ added in v0.7.0
func (s *SeriesQuery) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*SeriesQuery) Validate ¶ added in v0.7.0
func (s *SeriesQuery) Validate() error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implement proxy server.
func (*Server) GetLabelValues ¶
func (s *Server) GetLabelValues(ctx context.Context, params promapi.GetLabelValuesParams) (*promapi.LabelValuesResponse, error)
GetLabelValues implements getLabelValues operation. GET /api/v1/label/{label}/values
func (*Server) GetLabels ¶
func (s *Server) GetLabels(ctx context.Context, params promapi.GetLabelsParams) (*promapi.LabelsResponse, error)
GetLabels implements getLabels operation.
GET /api/v1/labels
func (*Server) GetMetadata ¶
func (s *Server) GetMetadata(ctx context.Context, params promapi.GetMetadataParams) (*promapi.MetadataResponse, error)
GetMetadata implements getMetadata operation.
GET /api/v1/metadata
func (*Server) GetQuery ¶
func (s *Server) GetQuery(ctx context.Context, params promapi.GetQueryParams) (*promapi.QueryResponse, error)
GetQuery implements getQuery operation.
Query Prometheus.
GET /api/v1/query
func (*Server) GetQueryExemplars ¶
func (s *Server) GetQueryExemplars(ctx context.Context, params promapi.GetQueryExemplarsParams) (*promapi.QueryExemplarsResponse, error)
GetQueryExemplars implements getQueryExemplars operation.
Query Prometheus.
GET /api/v1/query_examplars
func (*Server) GetQueryRange ¶
func (s *Server) GetQueryRange(ctx context.Context, params promapi.GetQueryRangeParams) (*promapi.QueryResponse, error)
GetQueryRange implements getQueryRange operation.
Query Prometheus.
GET /api/v1/query_range
func (*Server) GetRules ¶
func (s *Server) GetRules(ctx context.Context, params promapi.GetRulesParams) (*promapi.RulesResponse, error)
GetRules implements getRules operation.
GET /api/v1/rules
func (*Server) GetSeries ¶
func (s *Server) GetSeries(ctx context.Context, params promapi.GetSeriesParams) (*promapi.SeriesResponse, error)
GetSeries implements getSeries operation. Query Prometheus.
GET /api/v1/series
func (Server) NewError ¶
NewError creates *FailStatusCode from error returned by handler.
Used for common default response.
func (*Server) PostLabels ¶
func (s *Server) PostLabels(ctx context.Context, req *promapi.LabelsForm) (*promapi.LabelsResponse, error)
PostLabels implements postLabels operation.
POST /api/v1/labels
func (*Server) PostQuery ¶
func (s *Server) PostQuery(ctx context.Context, req *promapi.QueryForm) (*promapi.QueryResponse, error)
PostQuery implements postQuery operation.
Query Prometheus.
POST /api/v1/query
func (*Server) PostQueryExemplars ¶
func (s *Server) PostQueryExemplars(ctx context.Context, req *promapi.ExemplarsForm) (*promapi.QueryExemplarsResponse, error)
PostQueryExemplars implements postQueryExemplars operation.
Query Prometheus.
POST /api/v1/query_examplars
func (*Server) PostQueryRange ¶
func (s *Server) PostQueryRange(ctx context.Context, req *promapi.QueryRangeForm) (*promapi.QueryResponse, error)
PostQueryRange implements postQueryRange operation.
Query Prometheus.
POST /api/v1/query_range
func (*Server) PostSeries ¶
func (s *Server) PostSeries(ctx context.Context, req *promapi.SeriesForm) (*promapi.SeriesResponse, error)
PostSeries implements postSeries operation.
Query Prometheus.
POST /api/v1/series