driver

package
v0.0.0-...-9d38f52 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

README

package driver

TODO

Change interface of Apply() and Drain() to have context.Context as first parameter.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg interface {
	Driver() string
}

Cfg of storage.

type Conn

type Conn interface {
	Apply(ctx context.Context, key string, mut Mutation) error
	Drain(ctx context.Context, keys []string, sink Sink) error
}

Conn is a handle to a datastore connection.

type Driver

type Driver interface {
	Open(name string, cfg Cfg) (Conn, error)
}

Driver for datastore operations on time windows and their associated data.

type Mutation

type Mutation func(window.State) error

Mutation of window state.

type ReadWriter

type ReadWriter interface {
	DelSpan(s window.Span) error
	PutSpan(s window.Span, vs []interface{}) error
	Windows() (map[window.Span][]interface{}, error)
}

ReadWriter of single row data.

type Row

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

Row data for a key.

func NewRow

func NewRow(rw ReadWriter) (*Row, error)

func (*Row) Del

func (r *Row) Del(k window.Span)

func (*Row) Flush

func (r *Row) Flush() error

func (*Row) Get

func (r *Row) Get(k window.Span) []interface{}

func (*Row) Set

func (r *Row) Set(k window.Span, v []interface{})

func (*Row) Windows

func (r *Row) Windows() map[window.Span][]interface{}

type Sink

type Sink func(ctx context.Context, span window.Span, key string, vs []interface{}) error

Sink for data output.

Directories

Path Synopsis
Package badgerdriver is a generated protocol buffer package.
Package badgerdriver is a generated protocol buffer package.
Package bigtabledriver is a generated protocol buffer package.
Package bigtabledriver is a generated protocol buffer package.
Package boltdriver is a generated protocol buffer package.
Package boltdriver is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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