Documentation ¶
Index ¶
- type MockBot
- func (mn *MockBot) AddNewShards(shards ...int)
- func (mn *MockBot) HandleUserEvent(evt dshardorchestrator.EventType, data interface{})
- func (mn *MockBot) InitializeShardTransferFrom(shard int) (sessionID string, sequence int64)
- func (mn *MockBot) InitializeShardTransferTo(shard int, sessionID string, sequence int64)
- func (mn *MockBot) ResumeShard(shard int, sessionID string, sequence int64)
- func (mn *MockBot) SessionEstablished(info node.SessionInfo)
- func (mn *MockBot) Shutdown()
- func (mn *MockBot) StartShardTransferFrom(shard int) (numEventsSent int)
- func (mn *MockBot) StopShard(shard int) (sessionID string, sequence int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBot ¶
type MockBot struct { SessionEstablishedFunc func(info node.SessionInfo) StopShardFunc func(shard int) (sessionID string, sequence int64) ResumeShardFunc func(shard int, sessionID string, sequence int64) AddNewShardFunc func(shards ...int) // Caled when the bot should shut down, make sure to send EvtShutdown when completed ShutdownFunc func() InitializeShardTransferFromFunc func(shard int) (sessionID string, sequence int64) InitializeShardTransferToFunc func(shard int, sessionID string, sequence int64) // this should return when all user events has been sent, with the number of user events sent StartShardTransferFromFunc func(shard int) (numEventsSent int) HandleUserEventFunc func(evt dshardorchestrator.EventType, data interface{}) }
func (*MockBot) AddNewShards ¶
func (*MockBot) HandleUserEvent ¶
func (mn *MockBot) HandleUserEvent(evt dshardorchestrator.EventType, data interface{})
func (*MockBot) InitializeShardTransferFrom ¶
func (*MockBot) InitializeShardTransferTo ¶
func (*MockBot) ResumeShard ¶
func (*MockBot) SessionEstablished ¶
func (mn *MockBot) SessionEstablished(info node.SessionInfo)
func (*MockBot) Shutdown ¶
func (mn *MockBot) Shutdown()
Caled when the bot should shut down, make sure to send EvtShutdown when completed
func (*MockBot) StartShardTransferFrom ¶
this should return when all user events has been sent, with the number of user events sent
Click to show internal directories.
Click to hide internal directories.