Versions in this module Expand all Collapse all v2 v2.30.1 Jul 6, 2021 Changes in this version + const DefaultChunkedReadLimit + var UserAgent = fmt.Sprintf("Prometheus/%s", version.Version) + func DecodeReadRequest(r *http.Request) (*prompb.ReadRequest, error) + func DecodeWriteRequest(r io.Reader) (*prompb.WriteRequest, error) + func EncodeReadResponse(resp *prompb.ReadResponse, w http.ResponseWriter) error + func FromLabelMatchers(matchers []*prompb.LabelMatcher) ([]*labels.Matcher, error) + func FromQueryResult(sortSeries bool, res *prompb.QueryResult) storage.SeriesSet + func LabelProtosToMetric(labelPairs []*prompb.Label) model.Metric + func MergeLabels(primary, secondary []prompb.Label) []prompb.Label + func NegotiateResponseType(accepted []prompb.ReadRequest_ResponseType) (prompb.ReadRequest_ResponseType, error) + func NewReadHandler(logger log.Logger, r prometheus.Registerer, ...) http.Handler + func NewSampleAndChunkQueryableClient(c ReadClient, externalLabels labels.Labels, requiredMatchers []*labels.Matcher, ...) storage.SampleAndChunkQueryable + func NewWriteHandler(logger log.Logger, appendable storage.Appendable) http.Handler + func StreamChunkedReadResponses(stream io.Writer, queryIndex int64, ss storage.ChunkSeriesSet, ...) (storage.Warnings, error) + func ToQuery(from, to int64, matchers []*labels.Matcher, hints *storage.SelectHints) (*prompb.Query, error) + func ToQueryResult(ss storage.SeriesSet, sampleLimit int) (*prompb.QueryResult, storage.Warnings, error) + type ChunkedReader struct + func NewChunkedReader(r io.Reader, sizeLimit uint64, data []byte) *ChunkedReader + func (r *ChunkedReader) Next() ([]byte, error) + func (r *ChunkedReader) NextProto(pb proto.Message) error + type ChunkedWriter struct + func NewChunkedWriter(w io.Writer, f http.Flusher) *ChunkedWriter + func (w *ChunkedWriter) Write(b []byte) (int, error) + type Client struct + Client *http.Client + func (c *Client) Read(ctx context.Context, query *prompb.Query) (*prompb.QueryResult, error) + func (c *Client) Store(ctx context.Context, req []byte) error + func (c Client) Endpoint() string + func (c Client) Name() string + type ClientConfig struct + HTTPClientConfig config_util.HTTPClientConfig + Headers map[string]string + RetryOnRateLimit bool + SigV4Config *config.SigV4Config + Timeout model.Duration + URL *config_util.URL + type HTTPError struct + func (e HTTPError) Error() string + func (e HTTPError) Status() int + type MetadataAppender interface + AppendMetadata func(context.Context, []scrape.MetricMetadata) + type MetadataWatcher struct + func NewMetadataWatcher(l log.Logger, mg ReadyScrapeManager, name string, w MetadataAppender, ...) *MetadataWatcher + func (mw *MetadataWatcher) Start() + func (mw *MetadataWatcher) Stop() + type QueueManager struct + func NewQueueManager(metrics *queueManagerMetrics, watcherMetrics *wal.WatcherMetrics, ...) *QueueManager + func (t *QueueManager) Append(samples []record.RefSample) bool + func (t *QueueManager) AppendExemplars(exemplars []record.RefExemplar) bool + func (t *QueueManager) AppendMetadata(ctx context.Context, metadata []scrape.MetricMetadata) + func (t *QueueManager) SeriesReset(index int) + func (t *QueueManager) SetClient(c WriteClient) + func (t *QueueManager) Start() + func (t *QueueManager) Stop() + func (t *QueueManager) StoreSeries(series []record.RefSeries, index int) + type ReadClient interface + Read func(ctx context.Context, query *prompb.Query) (*prompb.QueryResult, error) + func NewReadClient(name string, conf *ClientConfig) (ReadClient, error) + type ReadyScrapeManager interface + Get func() (*scrape.Manager, error) + type RecoverableError struct + type Storage struct + func NewStorage(l log.Logger, reg prometheus.Registerer, stCallback startTimeCallback, ...) *Storage + func (s *Storage) Appender(ctx context.Context) storage.Appender + func (s *Storage) ApplyConfig(conf *config.Config) error + func (s *Storage) ChunkQuerier(ctx context.Context, mint, maxt int64) (storage.ChunkQuerier, error) + func (s *Storage) Close() error + func (s *Storage) Querier(ctx context.Context, mint, maxt int64) (storage.Querier, error) + func (s *Storage) StartTime() (int64, error) + type Watchable interface + TargetsActive func() map[string][]*scrape.Target + type WriteClient interface + Endpoint func() string + Name func() string + Store func(context.Context, []byte) error + func NewWriteClient(name string, conf *ClientConfig) (WriteClient, error) + type WriteStorage struct + func NewWriteStorage(logger log.Logger, reg prometheus.Registerer, walDir string, ...) *WriteStorage + func (rws *WriteStorage) Appender(_ context.Context) storage.Appender + func (rws *WriteStorage) ApplyConfig(conf *config.Config) error + func (rws *WriteStorage) Close() error Other modules containing this package github.com/wangjc0216/prometheus