Documentation ¶
Index ¶
- Constants
- func ManyToOne(runenv *runtime.RunEnv, initCtx *run.InitContext) error
- func OneOnOne(runenv *runtime.RunEnv, initCtx *run.InitContext) error
- func RunTgSyncTest(runenv *runtime.RunEnv, initCtx *run.InitContext, messagesByNode int) error
- type TgSyncConsumer
- type TgSyncListener
- type TgSyncProducer
Constants ¶
View Source
const ( ProducerRole = "producer" ConsumerRole = "consumer" )
Variables ¶
This section is empty.
Functions ¶
func RunTgSyncTest ¶
Types ¶
type TgSyncConsumer ¶
type TgSyncConsumer struct { IdGen int32 // other fields go here as normal TotalCount int DoneChannel chan bool Client *sync.DefaultClient }
func (*TgSyncConsumer) ConsumeMessage ¶
func (cons *TgSyncConsumer) ConsumeMessage(msg *message.DataMessage)
type TgSyncListener ¶
type TgSyncListener struct { // The channel to listen at ListenChannel <-chan *message.DataMessage // The channel to send messages to (basically the consumer) NotifyChannel chan<- *message.DataMessage }
A message listener that uses the Testgorund's sync service channels to receive messages
func (*TgSyncListener) ListenForMessages ¶
func (listener *TgSyncListener) ListenForMessages()
func (*TgSyncListener) SetNotifyChannel ¶
func (listener *TgSyncListener) SetNotifyChannel(channel chan<- *message.DataMessage)
type TgSyncProducer ¶
type TgSyncProducer struct { IdGen int32 Client *sync.DefaultClient Topic *sync.Topic }
A message producer that uses Testground's sync channels to produce messages for listeners/consumers
func (*TgSyncProducer) ProduceMessage ¶
func (prod *TgSyncProducer) ProduceMessage(data string)
Click to show internal directories.
Click to hide internal directories.