package
0.0.0-20210317165925-a59fb33c527d
Repository: https://github.com/conprof/db.git
Documentation: pkg.go.dev
# Functions
DecodeReadRequest reads a remote.Request from a http.Request.
EncodeReadResponse writes a remote.Response to a http.ResponseWriter.
FromLabelMatchers parses protobuf label matchers to Prometheus label matchers.
FromQueryResult unpacks and sorts a QueryResult proto.
LabelProtosToMetric unpack a []*prompb.Label to a model.Metric.
MergeLabels merges two sets of sorted proto labels, preferring those in primary to those in secondary when there is an overlap.
NegotiateResponseType returns first accepted response type that this server supports.
NewChunkedReader constructs a ChunkedReader.
NewChunkedWriter constructs a ChunkedWriter.
NewMetadataWatcher builds a new MetadataWatcher.
NewQueueManager builds a new QueueManager.
NewReadClient creates a new client for remote read.
NewSampleAndChunkQueryableClient returns a storage.SampleAndChunkQueryable which queries the given client to select series sets.
NewStorage returns a remote.Storage.
NewWriteClient creates a new client for remote write.
NewWriteStorage creates and runs a WriteStorage.
StreamChunkedReadResponses iterates over series, builds chunks and streams those to the caller.
ToQuery builds a Query proto.
ToQueryResult builds a QueryResult proto.
# Constants
DefaultChunkedReadLimit is the default value for the maximum size of the protobuf frame client allows.
# Variables
No description provided by the author
# Structs
ChunkedReader is a buffered reader that expects uvarint delimiter and checksum before each message.
ChunkedWriter is an io.Writer wrapper that allows streaming by adding uvarint delimiter before each write in a form of length of the corresponded byte array.
Client allows reading and writing from/to a remote HTTP endpoint.
ClientConfig configures a client.
No description provided by the author
MetadataWatcher watches the Scrape Manager for a given WriteMetadataTo.
QueueManager manages a queue of samples to be sent to the Storage indicated by the provided WriteClient.
No description provided by the author
Storage represents all the remote read and write endpoints.
WriteStorage represents all the remote write storage.
# Interfaces
MetadataAppender is an interface used by the Metadata Watcher to send metadata, It is read from the scrape manager, on to somewhere else.
ReadClient uses the SAMPLES method of remote read to read series samples from remote server.
No description provided by the author
Watchable represents from where we fetch active targets for metadata.
WriteClient defines an interface for sending a batch of samples to an external timeseries database.