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, resumeGatewayUrl string)
- func (mn *MockBot) InitializeShardTransferTo(shard int, sessionID string, sequence int64, resumeGatewayUrl string)
- func (mn *MockBot) ResumeShard(shard int, sessionID string, sequence int64, resumeGatewayUrl string)
- 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, resumeGatewayUrl string)
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, resumeGatewayUrl string) ResumeShardFunc func(shard int, sessionID string, sequence int64, resumeGatewayUrl string) 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, resumeGatewayUrl string) InitializeShardTransferToFunc func(shard int, sessionID string, sequence int64, resumeGatewayUrl string) // 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.