mocks

package
v0.0.0-...-03a7547 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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) Append

func (c *MockCommitLog) Append(b []byte) (int64, error)

func (*MockCommitLog) DeleteAll

func (c *MockCommitLog) DeleteAll() error

func (*MockCommitLog) Log

func (c *MockCommitLog) Log() [][]byte

func (*MockCommitLog) NewReader

func (c *MockCommitLog) NewReader(offset int64, maxBytes int32) (io.Reader, error)

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

func NewProxyForFetchMessages(numMessagesToFetch int) *MockProxy

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

func (p *MockProxy) MockedMessages() [][]byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL