tests

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 4 Imported by: 0

README

This folder holds full integration tests between node and orchestrator

Documentation

Index

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 (mn *MockBot) AddNewShards(shards ...int)

func (*MockBot) HandleUserEvent

func (mn *MockBot) HandleUserEvent(evt dshardorchestrator.EventType, data interface{})

func (*MockBot) InitializeShardTransferFrom

func (mn *MockBot) InitializeShardTransferFrom(shard int) (sessionID string, sequence int64)

func (*MockBot) InitializeShardTransferTo

func (mn *MockBot) InitializeShardTransferTo(shard int, sessionID string, sequence int64)

func (*MockBot) ResumeShard

func (mn *MockBot) ResumeShard(shard int, sessionID string, sequence int64)

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

func (mn *MockBot) StartShardTransferFrom(shard int) (numEventsSent int)

this should return when all user events has been sent, with the number of user events sent

func (*MockBot) StopShard

func (mn *MockBot) StopShard(shard int) (sessionID string, sequence int64)

Jump to

Keyboard shortcuts

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