MCPcopy
hub / github.com/IBM/sarama / NewMockBroker

Function NewMockBroker

mockbroker.go:406–408  ·  mockbroker.go::NewMockBroker

NewMockBroker launches a fake Kafka broker. It takes a TestReporter as provided by the test framework and a channel of responses to use. If an error occurs it is simply logged to the TestReporter and the broker exits.

(t TestReporter, brokerID int32)

Source from the content-addressed store, hash-verified

404// test framework and a channel of responses to use. If an error occurs it is
405// simply logged to the TestReporter and the broker exits.
406func NewMockBroker(t TestReporter, brokerID int32) *MockBroker {
407 return NewMockBrokerAddr(t, brokerID, "localhost:0")
408}
409
410// NewMockBrokerAddr behaves like newMockBroker but listens on the address you give
411// it rather than just some ephemeral port.

Calls 1

NewMockBrokerAddrFunction · 0.85