router

package
v0.0.0-...-b5bdc36 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

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

func (m *MockRouter) Close()

Close mocks base method

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

func NewAllowAllRouter(queue common.Queue) Router

NewAllowAllRouter creates a new router that routes all data to the backend queue.

func NewBroadcastRouter

func NewBroadcastRouter(routers []Router) Router

NewBroadcastRouter creates a broadcast router.

func NewShardedRouter

func NewShardedRouter(
	shardedQueues []ShardedQueue,
	totalShards int,
	scope tally.Scope,
) Router

NewShardedRouter creates a sharded router.

func NewWithAckRouter

func NewWithAckRouter(p producer.Producer) Router

NewWithAckRouter creates a new router that routes buffer and waits for acknowledgements.

type ShardedQueue

type ShardedQueue struct {
	sharding.ShardSet
	common.Queue
}

ShardedQueue is a backend queue responsible for a set of shards.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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