device

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: Apache-2.0 Imports: 11 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(client atomix.Client) (Store, error)

NewAtomixStore returns a new persistent Store

Jump to

Keyboard shortcuts

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