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

Method History

mockbroker.go:128–134  ·  view source on GitHub ↗

History returns a slice of RequestResponse pairs in the order they were processed by the broker. Note that in case of multiple connections to the broker the order expected by a test can be different from the order recorded in the history, unless some synchronization is implemented in the test.

()

Source from the content-addressed store, hash-verified

126// broker the order expected by a test can be different from the order recorded
127// in the history, unless some synchronization is implemented in the test.
128func (b *MockBroker) History() []RequestResponse {
129 b.lock.Lock()
130 history := make([]RequestResponse, len(b.history))
131 copy(history, b.history)
132 b.lock.Unlock()
133 return history
134}
135
136// Port returns the TCP port number the broker is listening for requests on.
137func (b *MockBroker) Port() int32 {

Calls

no outgoing calls