sponge_devices

package
v0.0.0-...-5fda629 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DevicesSavePathPrefixFormat = "/spongeregister/superbahnManager/devices/%v/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DevicesManager

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

func NewDevicesManager

func NewDevicesManager(ctx context.Context, d DevicesRecorder, user, userToken string) *DevicesManager

func (*DevicesManager) AddDevices

func (r *DevicesManager) AddDevices(d *devices.Device) error

func (*DevicesManager) DeleteDevices

func (r *DevicesManager) DeleteDevices(guid string) error

func (*DevicesManager) ExistDevices

func (r *DevicesManager) ExistDevices(guid string) bool

func (*DevicesManager) GetDevices

func (r *DevicesManager) GetDevices(guid string) *devices.Device

func (*DevicesManager) ListDevices

func (r *DevicesManager) ListDevices() map[string]*devices.Device

func (*DevicesManager) NewWatcher

func (r *DevicesManager) NewWatcher() clientv3.WatchChan

func (*DevicesManager) UpdateDevices

func (r *DevicesManager) UpdateDevices(d *devices.Device) error

type DevicesRecorder

type DevicesRecorder interface {
	Put(string, string) error
	Get(string) ([]byte, error)
	GetWithPrefix(string) (map[string][]byte, error)
	Del(string) error
	GetWatcher(string) clientv3.WatchChan
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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