Documentation ¶
Index ¶
- Variables
- func ErrUnexpectedResponse(res []byte) error
- func ToBridgeFactory(y *BridgeFactory) func(string, interface{}) error
- func ToStorage(y *Storage) func(string, interface{}) error
- type Bridge
- type BridgeFactory
- type Channel
- type ConnectResponseInterceptor
- type ConnectResponseInterceptorChain
- type ConnectResponseMatcher
- type Connection
- type ConnectionCenter
- type Side
- type Storage
- type StorageFactory
- type StreamConnection
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") ErrReceiveTimeout = errors.New("receive 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")
)
View Source
var (
InterceptorStop = errors.New("interceptor stop")
)
Functions ¶
func ErrUnexpectedResponse ¶
func ToBridgeFactory ¶ added in v1.1.28
func ToBridgeFactory(y *BridgeFactory) func(string, interface{}) error
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 ConnectResponseInterceptor ¶ added in v0.99.2
type ConnectResponseInterceptor func(*pb.ConnectResponse) error
type ConnectResponseInterceptorChain ¶ added in v0.99.2
type ConnectResponseInterceptorChain func(*pb.ConnectResponse) error
func NewConnectResponseInterceptorChain ¶ added in v0.99.2
func NewConnectResponseInterceptorChain(args ...interface{}) ConnectResponseInterceptorChain
type ConnectResponseMatcher ¶ added in v0.99.2
type ConnectResponseMatcher func(*pb.ConnectResponse) bool
func NewConnectResponseUnaryCallMatcher ¶ added in v0.99.2
func NewConnectResponseUnaryCallMatcher(kind pb.ConnectMessageKind, component, name, method string) ConnectResponseMatcher
type Connection ¶
func NewConnection ¶
func NewConnection(cleanup_cb func()) Connection
type ConnectionCenter ¶
type ConnectionCenter interface { BuildConnection(context.Context, *storage.Device, pb.DevicedService_ConnectServer) (Connection, error) UnaryCall(context.Context, *storage.Device, *pb.OpUnaryCallValue) (*pb.UnaryCallValue, error) StreamCall(context.Context, *storage.Device, *pb.OpStreamCallConfig, pb.DevicedService_StreamCallServer) error SyncFirmware(context.Context, *storage.Device) error }
func NewConnectionCenter ¶
func NewConnectionCenter(args ...interface{}) (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.