Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RegInterests is the register operation (used in the OperationMap) RegInterests clientmocks.Operation = "reg-interests" // UnregInterests is the unregister operation (used in the OperationMap) UnregInterests clientmocks.Operation = "unreg-interests" )
Variables ¶
View Source
var BlockEventFactory = func(block servicemocks.Block) servicemocks.BlockEvent { b, ok := block.(*servicemocks.BlockWrapper) if !ok { panic(fmt.Sprintf("Invalid block type: %T", block)) } return NewBlockEvent(b.Block()) }
BlockEventFactory creates block events
View Source
var FilteredBlockEventFactory = func(block servicemocks.Block) servicemocks.BlockEvent { b, ok := block.(*servicemocks.FilteredBlockWrapper) if !ok { panic(fmt.Sprintf("Invalid block type: %T", block)) } return NewFilteredBlockEvent(b.Block()) }
FilteredBlockEventFactory creates filtered block events
Functions ¶
func NewBlockEvent ¶
NewBlockEvent returns a new mock block event initialized with the given block
func NewFilteredBlockEvent ¶
func NewFilteredBlockEvent(fblock *pb.FilteredBlock) *pb.Event
NewFilteredBlockEvent returns a new mock filtered block event initialized with the given filtered block
Types ¶
type MockConnection ¶
type MockConnection struct {
clientmocks.MockConnection
}
MockConnection is a mock event hub connection used for unit testing
func NewConnection ¶
func NewConnection(opts ...clientmocks.Opt) *MockConnection
NewConnection returns a new MockConnection using the given options
Click to show internal directories.
Click to hide internal directories.