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 Field
- 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 Metric
- type NameOrID
- type Predicate
- type PredicateSet
- type Provider
- type Reader
- type Tag
- 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 ¶
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 ¶
func (u ErrorProvider) ReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error)
func (ErrorProvider) SeriesCardinalityReaderFor ¶
func (u ErrorProvider) SeriesCardinalityReaderFor(ctx context.Context, conf Config, bounds flux.Bounds, predicateSet PredicateSet) (Reader, error)
type Field ¶
Field holds the keys and values for a bunch of Metric Field k/v pairs where Value can be a uint64, int64, int, float32, float64, string, or bool.
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 Metric ¶
Metric is the interface for marshaling, if you implement this interface you can be marshalled into the line protocol. Woot!
type NameOrID ¶
NameOrID signifies the name of an organization/bucket or an ID for an organization/bucket.
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)