Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryData ¶
func QueryData(ctx context.Context, req *backend.QueryDataRequest, fn QueryDataFunc, limit int) (*backend.QueryDataResponse, error)
QueryData executes all queries from a request concurrently, using the provided function to execute each query. The concurrency limit is set by the limit parameter. A negative limit means no limit.
Types ¶
type Query ¶
type Query struct { PluginContext backend.PluginContext Headers http.Header DataQuery backend.DataQuery }
Query is a single query to be executed concurrently Index is the index of the query in the request PluginContext is the plugin context Headers are the HTTP headers of the request DataQuery is the query to be executed
type QueryDataFunc ¶
type QueryDataFunc func(ctx context.Context, query Query) (res backend.DataResponse)
QueryDataFunc is the function that plugins need to define to execute a single query
Click to show internal directories.
Click to hide internal directories.