iox

package
v0.195.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Query will initiate a query using the given query string, parameters, and memory allocator
	// against the iox instance. It returns an array.RecordReader from the arrow flight api.
	Query(ctx context.Context, query string, params []interface{}, mem memory.Allocator) (RecordReader, error)

	// GetSchema will retrieve a schema for the given table if this client supports that capability.
	// If this Client doesn't support this capability, it should return a flux error with the code
	// codes.Unimplemented.
	GetSchema(ctx context.Context, table string) (map[string]influxdbiox.ColumnType, error)
}

Client provides a way to query an iox instance.

type Config

type Config = influxdb.Config

type Dependency

type Dependency struct {
	Provider Provider
}

Dependency holds the iox.Dependency to be injected.

func (Dependency) Inject

func (d Dependency) Inject(ctx context.Context) context.Context

Inject will inject the iox dependency into the dependency chain.

type ErrorProvider

type ErrorProvider struct{}

ErrorProvider is an implementation of the Provider that returns an error.

func (ErrorProvider) ClientFor

func (u ErrorProvider) ClientFor(ctx context.Context, conf Config) (Client, error)

type Provider

type Provider interface {
	// ClientFor will return a client with the given configuration.
	ClientFor(ctx context.Context, conf Config) (Client, error)
}

Provider provides access to a Client with the given configuration.

func GetProvider

func GetProvider(ctx context.Context) Provider

GetProvider retrieves the iox Provider.

type RecordReader added in v0.192.0

type RecordReader interface {
	array.RecordReader
	Err() error
}

RecordReader is similar to the RecordReader interface provided by Arrow's array package, but includes a method for detecting errors that are sent mid-stream.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL