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: 13 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 snapshot
	Get(id devicesnapshot.ID) (*devicesnapshot.DeviceSnapshot, error)

	// Create creates a new device snapshot
	Create(snapshot *devicesnapshot.DeviceSnapshot) error

	// Update updates an existing device snapshot
	Update(snapshot *devicesnapshot.DeviceSnapshot) error

	// Delete deletes a device snapshot
	Delete(snapshot *devicesnapshot.DeviceSnapshot) error

	// List lists device snapshot
	List(chan<- *devicesnapshot.DeviceSnapshot) (stream.Context, error)

	// Watch watches the device snapshot store for changes
	Watch(chan<- stream.Event) (stream.Context, error)

	// Store stores a snapshot
	Store(snapshot *devicesnapshot.Snapshot) error

	// Load loads a snapshot
	Load(deviceID device.VersionedID) (*devicesnapshot.Snapshot, error)

	// Load loads all snapshots
	LoadAll(ch chan<- *devicesnapshot.Snapshot) (stream.Context, error)

	// Watch watches the snapshot store for changes
	WatchAll(chan<- stream.Event) (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 snapshot store

Jump to

Keyboard shortcuts

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