Documentation ¶
Index ¶
- Constants
- func AddServerlessParams(req *http.Request, maxBytes int) *http.Request
- func BuildIngesterSearchRequest(req *http.Request, searchReq *deeppb.SearchRequest, start, end uint32) (*http.Request, error)
- func BuildSearchBlockRequest(req *http.Request, searchReq *deeppb.SearchBlockRequest) (*http.Request, error)
- func BuildSearchRequest(req *http.Request, searchReq *deeppb.SearchRequest) (*http.Request, error)
- func ExtractServerlessParams(req *http.Request) (int, error)
- func IsBackendSearch(r *http.Request) bool
- func IsDeepQLQuery(r *deeppb.SearchRequest) bool
- func IsDeepQLReq(r *http.Request) (bool, string)
- func IsSearchBlock(r *http.Request) bool
- func ParseMessageToHttp(w http.ResponseWriter, r *http.Request, span opentracing.Span, ...)
- func ParseSearchBlockRequest(r *http.Request) (*deeppb.SearchBlockRequest, error)
- func ParseSearchRequest(r *http.Request) (*deeppb.SearchRequest, error)
- func ParseSnapshotID(r *http.Request) ([]byte, error)
- func ValidateAndSanitizeRequest(r *http.Request) (string, string, string, int64, int64, error)
Constants ¶
const ( URLParamSnapshotID = "snapshotID" URLParamTracepointID = "tpID" HeaderAccept = "Accept" HeaderContentType = "Content-Type" HeaderAcceptProtobuf = "application/protobuf" HeaderAcceptJSON = "application/json" PathPrefixQuerier = "/querier" PathSnapshots = "/api/snapshots/{snapshotID}" PathSearch = "/api/search" PathSearchTags = "/api/search/tags" PathSearchTagValues = "/api/search/tag/{tagName}/values" PathEcho = "/api/echo" PathUsageStats = "/status/usage-stats" PathPrefixTracepoints = "/tracepoints" PathTracepoints = "/api/tracepoints" PathTracepointsQuery = "/api/tracepoints/query" PathDeleteTracepoint = "/api/tracepoints/{tpID}" PathSearchTagValuesV2 = "/api/v2/search/tag/{tagName}/values" QueryModeKey = "mode" QueryModeIngesters = "ingesters" QueryModeBlocks = "blocks" QueryModeAll = "all" BlockStartKey = "blockStart" BlockEndKey = "blockEnd" )
Variables ¶
This section is empty.
Functions ¶
func AddServerlessParams ¶
AddServerlessParams takes an already existing http.Request and adds maxBytes to it
func BuildIngesterSearchRequest ¶
func BuildIngesterSearchRequest(req *http.Request, searchReq *deeppb.SearchRequest, start, end uint32) (*http.Request, error)
BuildIngesterSearchRequest takes a deeppb.SearchRequest and creates a request for searching the ingesters
func BuildSearchBlockRequest ¶
func BuildSearchBlockRequest(req *http.Request, searchReq *deeppb.SearchBlockRequest) (*http.Request, error)
BuildSearchBlockRequest takes a deeppb.SearchBlockRequest and populates the passed http.Request with the appropriate params. If no http.Request is provided a new one is created.
func BuildSearchRequest ¶
BuildSearchRequest takes a deeppb.SearchRequest and populates the passed http.Request with the appropriate params. If no http.Request is provided a new one is created.
func ExtractServerlessParams ¶
ExtractServerlessParams extracts params for the serverless functions from an http.Request
func IsBackendSearch ¶
IsBackendSearch returns true if the request has a start, end and tags parameter and is the /api/search path
func IsDeepQLQuery ¶
func IsDeepQLQuery(r *deeppb.SearchRequest) bool
IsDeepQLQuery returns true if the request contains a deepQL query.
func IsDeepQLReq ¶
IsDeepQLReq returns true if the request contains a deepQL query.
func IsSearchBlock ¶
IsSearchBlock returns true if the request appears to be for backend blocks. It is not exhaustive and only looks for blockID
func ParseMessageToHttp ¶
func ParseSearchBlockRequest ¶
func ParseSearchBlockRequest(r *http.Request) (*deeppb.SearchBlockRequest, error)
ParseSearchBlockRequest parses all http parameters necessary to perform a block search.
func ParseSearchRequest ¶
func ParseSearchRequest(r *http.Request) (*deeppb.SearchRequest, error)
ParseSearchRequest takes an http.Request and decodes query params to create a deeppb.SearchRequest
Types ¶
This section is empty.