Documentation ¶
Overview ¶
Package router is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockRouter ¶
type MockRouter struct {
// contains filtered or unexported fields
}
MockRouter is a mock of Router interface
func NewMockRouter ¶
func NewMockRouter(ctrl *gomock.Controller) *MockRouter
NewMockRouter creates a new mock instance
func (*MockRouter) EXPECT ¶
func (m *MockRouter) EXPECT() *MockRouterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRouter) Route ¶
func (m *MockRouter) Route(arg0 uint32, arg1 *common.RefCountedBuffer) error
Route mocks base method
type MockRouterMockRecorder ¶
type MockRouterMockRecorder struct {
// contains filtered or unexported fields
}
MockRouterMockRecorder is the mock recorder for MockRouter
func (*MockRouterMockRecorder) Close ¶
func (mr *MockRouterMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockRouterMockRecorder) Route ¶
func (mr *MockRouterMockRecorder) Route(arg0, arg1 interface{}) *gomock.Call
Route indicates an expected call of Route
type Router ¶
type Router interface { // Route routes a buffer for a given shard. It should decrement // the reference count of the buffer is done being used. Route(shard uint32, buffer *common.RefCountedBuffer) error // Close closes the router. Close() }
Router routes data to the corresponding backends.
func NewAllowAllRouter ¶
NewAllowAllRouter creates a new router that routes all data to the backend queue.
func NewBroadcastRouter ¶
NewBroadcastRouter creates a broadcast router.
func NewShardedRouter ¶
func NewShardedRouter( shardedQueues []ShardedQueue, totalShards int, scope tally.Scope, ) Router
NewShardedRouter creates a sharded router.
func NewWithAckRouter ¶
NewWithAckRouter creates a new router that routes buffer and waits for acknowledgements.