Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidArgument = errors.New("invalid argument") ErrChannelClosed = errors.New("channel closed") ErrUnexpectedResponse = errors.New("unexpected response") ErrBridgeClosed = errors.New("bridge closed") ErrTimeout = errors.New("timeout") ErrDuplicatedDeviceInstance = errors.New("duplicated device instance") ErrDeviceOffline = errors.New("device offline") )
View Source
var (
ErrUnknownBridgeDriver = errors.New("unknown bridge driver")
)
View Source
var (
ErrUnknownStorageDriver = errors.New("unknown storage driver")
)
Functions ¶
This section is empty.
Types ¶
type BridgeFactory ¶
type BridgeFactory interface { BuildBridge(device_id string, sess int64) (Bridge, error) GetBridge(br_id string) (Bridge, error) }
func NewBridgeFactory ¶
func NewBridgeFactory(name string, args ...interface{}) (BridgeFactory, error)
type Connection ¶
func NewConnection ¶
func NewConnection(cleanup_cb func()) Connection
type ConnectionCenter ¶
type ConnectionCenter interface { BuildConnection(*storage.Device, pb.DevicedService_ConnectServer) (Connection, error) UnaryCall(*storage.Device, *pb.OpUnaryCallValue) (*pb.UnaryCallValue, error) StreamCall(*storage.Device, *pb.OpStreamCallConfig, pb.DevicedService_StreamCallServer) error }
func NewConnectionCenter ¶
func NewConnectionCenter(brfty BridgeFactory, stor Storage, sess_stor session_storage.SessionStorage, logger log.FieldLogger) (ConnectionCenter, error)
type Storage ¶
type Storage interface { AddBridgeToDevice(dev_id string, sess int32, br_id string) error RemoveBridgeFromDevice(dev_id string, sess int32, br_id string) error ListBridgesFromDevice(dev_id string, sess int32) ([]string, error) }
func NewStorage ¶
type StorageFactory ¶
type StreamConnection ¶
type StreamConnection interface { Connection }
Click to show internal directories.
Click to hide internal directories.