testing

package
v0.0.0-...-6789dc4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: GPL-3.0, GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package testing contains simple test implementations of some broker interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestBrokerConfig

type TestBrokerConfig struct {
	ConfigSessionQueueSize uint
	ConfigBrokerQueueSize  uint
}

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

Jump to

Keyboard shortcuts

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