Documentation ¶
Index ¶
- type MockCommitLog
- func (c *MockCommitLog) Append(b []byte) (int64, error)
- func (c *MockCommitLog) DeleteAll() error
- func (c *MockCommitLog) Log() [][]byte
- func (c *MockCommitLog) NewReader(offset int64, maxBytes int32) (io.Reader, error)
- func (c *MockCommitLog) NewestOffset() int64
- func (c *MockCommitLog) OldestOffset() int64
- func (c *MockCommitLog) TruncateTo(int64) error
- type MockProxy
- func (p *MockProxy) CreateTopic(clientID string, createRequest *protocol.CreateTopicRequest) (*protocol.CreateTopicsResponse, error)
- func (p *MockProxy) FetchMessages(clientID string, fetchRequest *protocol.FetchRequest) (*protocol.FetchResponses, error)
- func (p *MockProxy) MockedMessages() [][]byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCommitLog ¶
type MockCommitLog struct {
// contains filtered or unexported fields
}
func NewCommitLog ¶
func NewCommitLog() *MockCommitLog
func (*MockCommitLog) DeleteAll ¶
func (c *MockCommitLog) DeleteAll() error
func (*MockCommitLog) Log ¶
func (c *MockCommitLog) Log() [][]byte
func (*MockCommitLog) NewestOffset ¶
func (c *MockCommitLog) NewestOffset() int64
func (*MockCommitLog) OldestOffset ¶
func (c *MockCommitLog) OldestOffset() int64
func (*MockCommitLog) TruncateTo ¶
func (c *MockCommitLog) TruncateTo(int64) error
type MockProxy ¶
type MockProxy struct {
// contains filtered or unexported fields
}
MockProxy for testing
func NewProxyForFetchMessages ¶
NewProxyForFetchMessages that fetches numMessagesToFetch messages in batches of 2
func (*MockProxy) CreateTopic ¶
func (p *MockProxy) CreateTopic(clientID string, createRequest *protocol.CreateTopicRequest) (*protocol.CreateTopicsResponse, error)
func (*MockProxy) FetchMessages ¶
func (p *MockProxy) FetchMessages(clientID string, fetchRequest *protocol.FetchRequest) (*protocol.FetchResponses, error)
func (*MockProxy) MockedMessages ¶
Click to show internal directories.
Click to hide internal directories.