dataconnectors

package
v0.0.0-...-056b33b Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 7 Imported by: 1

README

Spice.ai Data Connectors

Currently supported connectors:

Contribution guide

Writing a data connector means implementing the DataConnector interface defined at dataconnector.go and adding it to the NewDataConnector factory function.

type DataConnector interface {
    Init(Epoch time.Time, Period time.Duration, Interval time.Duration, params map[string]string) error
    Read(handler func(data []byte, metadata map[string]string) ([]byte, error)) error
}

Data Connectors are consumed in the Spice.ai pod manifest in the data section. E.g.

data:
  connector:
  name: file
  params:
    path: my-data.csv

The data connector name is self-declared by the component, but must be unique across all components.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataConnector

type DataConnector interface {
	Init(Epoch time.Time, Period time.Duration, Interval time.Duration, params map[string]string) error
	Read(handler func(data []byte, metadata map[string]string) ([]byte, error)) error
}

func NewDataConnector

func NewDataConnector(name string) (DataConnector, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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