metathings_data_storage_sdk

package
v1.1.28 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedDataStorageDriver = errors.New("unsupported data storage driver")
)

Functions

func ToDataStorage

func ToDataStorage(ds *DataStorage) func(string, interface{}) error

Types

type DataStorage

type DataStorage interface {
	Write(ctx context.Context, measurement string, tags map[string]string, data map[string]interface{}) error
}

func NewDataStorage

func NewDataStorage(name string, args ...interface{}) (DataStorage, error)

func NewDummyDataStorage

func NewDummyDataStorage(args ...interface{}) (DataStorage, error)

func NewInfluxdb2DataStorage

func NewInfluxdb2DataStorage(args ...interface{}) (DataStorage, error)

type DataStorageFactory

type DataStorageFactory func(...interface{}) (DataStorage, error)

type DummyDataStorage

type DummyDataStorage struct {
	// contains filtered or unexported fields
}

func (*DummyDataStorage) Write

func (s *DummyDataStorage) Write(ctx context.Context, measurement string, tags map[string]string, data map[string]interface{}) error

type Influxdb2DataStorage

type Influxdb2DataStorage struct {
	// contains filtered or unexported fields
}

func (*Influxdb2DataStorage) Write

func (s *Influxdb2DataStorage) Write(ctx context.Context, measurement string, tags map[string]string, data map[string]interface{}) error

type Influxdb2DataStorageOption

type Influxdb2DataStorageOption struct {
	Address  string
	Token    string
	Username string
	Password string
	Org      string
	Bucket   string
}

type MockDataStorage

type MockDataStorage struct {
	mock.Mock
}

func (*MockDataStorage) Write

func (m *MockDataStorage) Write(ctx context.Context, measurement string, tags map[string]string, data map[string]interface{}) error

Jump to

Keyboard shortcuts

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