Documentation
¶
Index ¶
- Constants
- type Storage
- func (s *Storage) GetFieldNames(qctx *logstorage.QueryContext) ([]logstorage.ValueWithHits, error)
- func (s *Storage) GetFieldValues(qctx *logstorage.QueryContext, fieldName string, limit uint64) ([]logstorage.ValueWithHits, error)
- func (s *Storage) GetStreamFieldNames(qctx *logstorage.QueryContext) ([]logstorage.ValueWithHits, error)
- func (s *Storage) GetStreamFieldValues(qctx *logstorage.QueryContext, fieldName string, limit uint64) ([]logstorage.ValueWithHits, error)
- func (s *Storage) GetStreamIDs(qctx *logstorage.QueryContext, limit uint64) ([]logstorage.ValueWithHits, error)
- func (s *Storage) GetStreams(qctx *logstorage.QueryContext, limit uint64) ([]logstorage.ValueWithHits, error)
- func (s *Storage) MustStop()
- func (s *Storage) RunQuery(qctx *logstorage.QueryContext, writeBlock logstorage.WriteDataBlockFunc) error
Constants ¶
const ( // FieldNamesProtocolVersion is the version of the protocol used for /internal/select/field_names HTTP endpoint. // // It must be updated every time the protocol changes. FieldNamesProtocolVersion = "v2" // FieldValuesProtocolVersion is the version of the protocol used for /internal/select/field_values HTTP endpoint. // // It must be updated every time the protocol changes. FieldValuesProtocolVersion = "v2" // StreamFieldNamesProtocolVersion is the version of the protocol used for /internal/select/stream_field_names HTTP endpoint. // // It must be updated every time the protocol changes. StreamFieldNamesProtocolVersion = "v2" // StreamFieldValuesProtocolVersion is the version of the protocol used for /internal/select/stream_field_values HTTP endpoint. // // It must be updated every time the protocol changes. StreamFieldValuesProtocolVersion = "v2" // StreamsProtocolVersion is the version of the protocol used for /internal/select/streams HTTP endpoint. // // It must be updated every time the protocol changes. StreamsProtocolVersion = "v2" // StreamIDsProtocolVersion is the version of the protocol used for /internal/select/stream_ids HTTP endpoint. // // It must be updated every time the protocol changes. StreamIDsProtocolVersion = "v2" // QueryProtocolVersion is the version of the protocol used for /internal/select/query HTTP endpoint. // // It must be updated every time the protocol changes. QueryProtocolVersion = "v2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a network storage for querying remote storage nodes in the cluster.
func NewStorage ¶
func NewStorage(addrs []string, authCfgs []*promauth.Config, isTLSs []bool, disableCompression bool) *Storage
NewStorage returns new Storage for the given addrs and the given authCfgs.
If disableCompression is set, then uncompressed responses are received from storage nodes.
Call MustStop on the returned storage when it is no longer needed.
func (*Storage) GetFieldNames ¶
func (s *Storage) GetFieldNames(qctx *logstorage.QueryContext) ([]logstorage.ValueWithHits, error)
GetFieldNames executes qctx and returns field names seen in results.
func (*Storage) GetFieldValues ¶
func (s *Storage) GetFieldValues(qctx *logstorage.QueryContext, fieldName string, limit uint64) ([]logstorage.ValueWithHits, error)
GetFieldValues executes qctx and returns unique values for the fieldName seen in results.
If limit > 0, then up to limit unique values are returned.
func (*Storage) GetStreamFieldNames ¶
func (s *Storage) GetStreamFieldNames(qctx *logstorage.QueryContext) ([]logstorage.ValueWithHits, error)
GetStreamFieldNames executes qctx and returns stream field names seen in results.
func (*Storage) GetStreamFieldValues ¶
func (s *Storage) GetStreamFieldValues(qctx *logstorage.QueryContext, fieldName string, limit uint64) ([]logstorage.ValueWithHits, error)
GetStreamFieldValues executes qctx and returns stream field values for the given fieldName seen in results.
If limit > 0, then up to limit unique stream field values are returned.
func (*Storage) GetStreamIDs ¶
func (s *Storage) GetStreamIDs(qctx *logstorage.QueryContext, limit uint64) ([]logstorage.ValueWithHits, error)
GetStreamIDs executes qctx and returns streamIDs seen in query results.
If limit > 0, then up to limit unique streamIDs are returned.
func (*Storage) GetStreams ¶
func (s *Storage) GetStreams(qctx *logstorage.QueryContext, limit uint64) ([]logstorage.ValueWithHits, error)
GetStreams executes qctx and returns streams seen in query results.
If limit > 0, then up to limit unique streams are returned.
func (*Storage) RunQuery ¶
func (s *Storage) RunQuery(qctx *logstorage.QueryContext, writeBlock logstorage.WriteDataBlockFunc) error
RunQuery runs the given qctx and calls writeBlock for the returned data blocks