Documentation ¶
Index ¶
- type Config
- type Dependency
- type ErrorProvider
- func (u ErrorProvider) ReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, ...) (Reader, error)
- func (u ErrorProvider) SeriesCardinalityReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, ...) (Reader, error)
- func (u ErrorProvider) WriterFor(ctx context.Context, conf Config) (Writer, error)
- type HttpClient
- type HttpProvider
- func (h HttpProvider) ReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, ...) (Reader, error)
- func (h HttpProvider) SeriesCardinalityReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, ...) (Reader, error)
- func (h HttpProvider) WriterFor(ctx context.Context, conf Config) (Writer, error)
- type NameOrID
- type Predicate
- type PredicateSet
- type Provider
- type Reader
- type UnimplementedProvider
- func (u UnimplementedProvider) ReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, ...) (Reader, error)
- func (u UnimplementedProvider) SeriesCardinalityReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, ...) (Reader, error)
- func (u UnimplementedProvider) WriterFor(ctx context.Context, conf Config) (Writer, error)
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct {
Provider Provider
}
Dependency will inject the Provider into the dependency chain.
type ErrorProvider ¶ added in v0.140.0
type ErrorProvider struct{}
ErrorProvider provides default implementations for a Provider. This implements all of the Provider methods by returning an error with the code codes.Unimplemented.
func (ErrorProvider) ReaderFor ¶ added in v0.140.0
func (u ErrorProvider) ReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error)
func (ErrorProvider) SeriesCardinalityReaderFor ¶ added in v0.140.0
func (u ErrorProvider) SeriesCardinalityReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error)
type HttpClient ¶
HttpClient is an http client for reading from an influxdb instance.
func (*HttpClient) Query ¶
func (h *HttpClient) Query(ctx context.Context, f func(table flux.Table) error, file *ast.File, now time.Time, mem memory.Allocator) error
Query will create a new http.Request, send it to the server, then decode the request as a flux.TableIterator and invoke the function with each flux.Table.
type HttpProvider ¶
type HttpProvider struct {
DefaultConfig Config
}
HttpProvider is an implementation of the Provider that implements the read methods with HTTP calls to an influxdb query endpoint.
func (HttpProvider) ReaderFor ¶
func (h HttpProvider) ReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error)
func (HttpProvider) SeriesCardinalityReaderFor ¶
func (h HttpProvider) SeriesCardinalityReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error)
type NameOrID ¶
NameOrID signifies the name of an organization/bucket or an ID for an organization/bucket.
func (NameOrID) IdOrName ¶ added in v0.117.0
IdOrName returns the ID if set, otherwise it returns the Name
type Predicate ¶
type Predicate struct { interpreter.ResolvedFunction // KeepEmpty determines if empty tables should be retained // if none of the rows pass the filter. KeepEmpty bool }
Predicate defines a predicate to filter storage with.
type PredicateSet ¶
type PredicateSet []Predicate
PredicateSet holds a set of predicates that will filter the results.
func (PredicateSet) Copy ¶
func (ps PredicateSet) Copy() PredicateSet
Copy produces a deep copy of the PredicateSet.
type Provider ¶
type Provider interface { // ReaderFor will construct a Reader using the given configuration parameters. // If the parameters are their zero values, appropriate defaults may be used // or an error may be returned if the implementation does not have a default. ReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error) // SeriesCardinalityReaderFor will return a Reader // for the SeriesCardinality operation. SeriesCardinalityReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error) // WriterFor will construct a Writer using the given configuration parameters. // If the parameters are their zero values, appropriate defaults may be used // or an error may be returned if the implementation does not have a default. WriterFor(ctx context.Context, conf Config) (Writer, error) }
Provider is an interface for creating a Reader that will read data from an influxdb instance.
This provides different provider methods depending on the read method. The read methods can be expanded so implementors of this interface should embed the UnimplementedProvider to automatically implement new methods with a default unimplemented stub.
func GetProvider ¶
GetProvider will return the Provider for the current context. If no Provider has been injected into the dependencies, this will return a default provider.
type Reader ¶
type Reader interface { // Read will produce flux.Table values using the memory.Allocator // and it will pass those tables to the given function. Read(ctx context.Context, f func(flux.Table) error, mem memory.Allocator) error }
Reader reads tables from an influxdb instance.
type UnimplementedProvider ¶
type UnimplementedProvider struct{}
UnimplementedProvider provides default implementations for a Provider. This implements all of the Provider methods by returning an error with the code codes.Unimplemented.
func (UnimplementedProvider) ReaderFor ¶
func (u UnimplementedProvider) ReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error)
func (UnimplementedProvider) SeriesCardinalityReaderFor ¶
func (u UnimplementedProvider) SeriesCardinalityReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error)