device

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	io.Closer

	// Get gets a device change
	Get(id devicechange.ID) (*devicechange.DeviceChange, error)

	// Create creates a new device change
	Create(change *devicechange.DeviceChange) error

	// Update updates an existing device change
	Update(change *devicechange.DeviceChange) error

	// Delete deletes a device change
	Delete(change *devicechange.DeviceChange) error

	// List lists device change
	List(deviceID device.VersionedID, ch chan<- *devicechange.DeviceChange) (stream.Context, error)

	// Watch watches the device change store for changes
	Watch(deviceID device.VersionedID, ch chan<- stream.Event, opts ...WatchOption) (stream.Context, error)
}

Store stores DeviceChanges

func NewAtomixStore

func NewAtomixStore(config config.Config) (Store, error)

NewAtomixStore returns a new persistent Store

func NewLocalStore

func NewLocalStore() (Store, error)

NewLocalStore returns a new local device store

type WatchOption

type WatchOption interface {
	// contains filtered or unexported methods
}

WatchOption is a configuration option for Watch calls

func WithChangeID

func WithChangeID(id devicechange.ID) WatchOption

WithChangeID returns a Watch option that watches for changes to the given change ID

func WithReplay

func WithReplay() WatchOption

WithReplay returns a WatchOption that replays past changes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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