Documentation ¶
Index ¶
- type BrokerPeer
- type Consumer
- type Peer
- func (p *Peer) DoneChannel()
- func (p *Peer) ErrorChannel() <-chan error
- func (p *Peer) ReceiveMessage() ([]byte, error)
- func (p *Peer) SendChannel() chan<- []byte
- func (p *Peer) SetupPublishRoutine()
- func (p *Peer) SetupPublisherConnection(connectionURL string) error
- func (p *Peer) SetupSubscriberConnection(connectionURL string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerPeer ¶
type BrokerPeer struct {
// contains filtered or unexported fields
}
BrokerPeer implements the peer interface for AMQP brokers
func NewBrokerPeer ¶
func NewBrokerPeer(settings broker.MQSettings) *BrokerPeer
NewPeer creates and returns a new Peer for communicating with Kafka
func (*BrokerPeer) GetResults ¶
func (bp *BrokerPeer) GetResults() *broker.Results
func (*BrokerPeer) SetupPublishers ¶
func (bp *BrokerPeer) SetupPublishers() error
func (*BrokerPeer) SetupSubscribers ¶
func (bp *BrokerPeer) SetupSubscribers() error
func (*BrokerPeer) StartPublishers ¶
func (bp *BrokerPeer) StartPublishers()
func (*BrokerPeer) StartSubscribers ¶
func (bp *BrokerPeer) StartSubscribers()
func (*BrokerPeer) Teardown ¶
func (bp *BrokerPeer) Teardown()
Performs any broker-connection cleanup after test is done
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer represents a Sarama consumer group consumer
func (*Consumer) Cleanup ¶
func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited
func (*Consumer) ConsumeClaim ¶
func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages(). NOTE: The function itself is called within a goroutine
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
Peer stores specific Kafka broker connection information
func (*Peer) DoneChannel ¶
func (p *Peer) DoneChannel()
DoneChannel signals to the peer that message publishing has completed.
func (*Peer) ErrorChannel ¶
ErrorChannel returns the channel on which the peer sends publish errors.
func (*Peer) ReceiveMessage ¶
func (*Peer) SendChannel ¶
Send returns a channel on which messages can be sent for publishing.
func (*Peer) SetupPublishRoutine ¶
func (p *Peer) SetupPublishRoutine()