Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type HTTP ¶
HTTP implements a Flux query client that makes requests to the /api/v2/query API endpoint.
func (*HTTP) Query ¶
func (s *HTTP) Query(ctx context.Context, r *ProxyRequest) (flux.ResultIterator, error)
Query runs a flux query against a influx server and decodes the result
type ProxyRequest ¶
type ProxyRequest struct { // Compiler converts the query to a specification to run against the data. Compiler flux.Compiler // Dialect is the result encoder Dialect flux.Dialect }
ProxyRequest specifies a query request and the dialect for the results.
type QueryDialect ¶
type QueryDialect struct { Header *bool `json:"header"` Delimiter string `json:"delimiter"` CommentPrefix string `json:"commentPrefix"` DateTimeFormat string `json:"dateTimeFormat"` Annotations []string `json:"annotations"` }
QueryDialect is the formatting options for the query response.
type QueryRequest ¶
type QueryRequest struct { Spec *flux.Spec `json:"spec,omitempty"` Query string `json:"query"` Type string `json:"type"` Dialect QueryDialect `json:"dialect"` }
QueryRequest is a flux query request.
func QueryRequestFromProxyRequest ¶
func QueryRequestFromProxyRequest(req *ProxyRequest) (*QueryRequest, error)
func (QueryRequest) ProxyRequest ¶
func (r QueryRequest) ProxyRequest() *ProxyRequest
ProxyRequest returns a request to proxy from the flux.
func (QueryRequest) Validate ¶
func (r QueryRequest) Validate() error
Validate checks the query request and returns an error if the request is invalid.
func (QueryRequest) WithDefaults ¶
func (r QueryRequest) WithDefaults() QueryRequest
WithDefaults adds default values to the request.
Click to show internal directories.
Click to hide internal directories.