Documentation ¶
Overview ¶
Package testing contains simple test implementations of some broker interfaces.
Index ¶
- type TestBrokerConfig
- type TestBrokerSession
- func (tbs *TestBrokerSession) DeviceIdentifier() string
- func (tbs *TestBrokerSession) DeviceImageChannel() string
- func (tbs *TestBrokerSession) DeviceImageModel() string
- func (tbs *TestBrokerSession) DropByMsgId(chanId store.InternalChannelId, targets []protocol.Notification) error
- func (tbs *TestBrokerSession) ExchangeScratchArea() *broker.ExchangesScratchArea
- func (tbs *TestBrokerSession) Feed(exchg broker.Exchange)
- func (tbs *TestBrokerSession) Get(chanId store.InternalChannelId, cachedOk bool) (int64, []protocol.Notification, error)
- func (tbs *TestBrokerSession) InternalChannelId() store.InternalChannelId
- func (tbs *TestBrokerSession) Levels() broker.LevelsMap
- func (tbs *TestBrokerSession) SessionChannel() <-chan broker.Exchange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestBrokerConfig ¶
Test implementation of BrokerConfig.
func (*TestBrokerConfig) BrokerQueueSize ¶
func (tbc *TestBrokerConfig) BrokerQueueSize() uint
func (*TestBrokerConfig) SessionQueueSize ¶
func (tbc *TestBrokerConfig) SessionQueueSize() uint
type TestBrokerSession ¶
type TestBrokerSession struct { DeviceId string Model string ImageChannel string Exchanges chan broker.Exchange LevelsMap broker.LevelsMap // hooks DoGet func(store.InternalChannelId, bool) (int64, []protocol.Notification, error) DoDropByMsgId func(store.InternalChannelId, []protocol.Notification) error // contains filtered or unexported fields }
Test implementation of BrokerSession.
func (*TestBrokerSession) DeviceIdentifier ¶
func (tbs *TestBrokerSession) DeviceIdentifier() string
func (*TestBrokerSession) DeviceImageChannel ¶
func (tbs *TestBrokerSession) DeviceImageChannel() string
func (*TestBrokerSession) DeviceImageModel ¶
func (tbs *TestBrokerSession) DeviceImageModel() string
func (*TestBrokerSession) DropByMsgId ¶
func (tbs *TestBrokerSession) DropByMsgId(chanId store.InternalChannelId, targets []protocol.Notification) error
func (*TestBrokerSession) ExchangeScratchArea ¶
func (tbs *TestBrokerSession) ExchangeScratchArea() *broker.ExchangesScratchArea
func (*TestBrokerSession) Feed ¶
func (tbs *TestBrokerSession) Feed(exchg broker.Exchange)
func (*TestBrokerSession) Get ¶
func (tbs *TestBrokerSession) Get(chanId store.InternalChannelId, cachedOk bool) (int64, []protocol.Notification, error)
func (*TestBrokerSession) InternalChannelId ¶
func (tbs *TestBrokerSession) InternalChannelId() store.InternalChannelId
func (*TestBrokerSession) Levels ¶
func (tbs *TestBrokerSession) Levels() broker.LevelsMap
func (*TestBrokerSession) SessionChannel ¶
func (tbs *TestBrokerSession) SessionChannel() <-chan broker.Exchange
Click to show internal directories.
Click to hide internal directories.