storagedriver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageDriver

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

func (*StorageDriver) AddDevice

func (driver *StorageDriver) AddDevice(deviceName string, protocols map[string]contract.ProtocolProperties, adminState contract.AdminState) error

when a new Device associated with this Device Service is added

func (*StorageDriver) HandleReadCommands

func (driver *StorageDriver) HandleReadCommands(deviceName string, protocols map[string]contract.ProtocolProperties, reqs []dsModels.CommandRequest) ([]*dsModels.CommandValue, error)

HandleReadCommands triggers a protocol Read operation for the specified device.

func (*StorageDriver) HandleWriteCommands

func (driver *StorageDriver) HandleWriteCommands(deviceName string, protocols map[string]contract.ProtocolProperties, reqs []dsModels.CommandRequest,
	params []*dsModels.CommandValue) error

HandleWriteCommands passes a slice of CommandRequest

func (*StorageDriver) Initialize

func (driver *StorageDriver) Initialize(logger logger.LoggingClient, asyncValues chan<- *dsModels.AsyncValues, deviceCh chan<- []dsModels.DiscoveredDevice) error

Initialize performs protocol-specific initialization for the device

func (*StorageDriver) RemoveDevice

func (driver *StorageDriver) RemoveDevice(deviceName string, protocols map[string]contract.ProtocolProperties) error

when a Device associated with this Device Service is removed

func (*StorageDriver) Stop

func (driver *StorageDriver) Stop(force bool) error

Stop the protocol-specific DS code to shutdown gracefully

func (*StorageDriver) UpdateDevice

func (driver *StorageDriver) UpdateDevice(deviceName string, protocols map[string]contract.ProtocolProperties, adminState contract.AdminState) error

when a Device associated with this Device Service is updated

type StorageHandler

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

func NewStorageHandler

func NewStorageHandler(service *sdk.DeviceService, logger logger.LoggingClient, asyncValues chan<- *models.AsyncValues) *StorageHandler

func (StorageHandler) Start

func (handler StorageHandler) Start() error

Jump to

Keyboard shortcuts

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