Documentation
¶
Index ¶
- func NewHost(i int) (host.Host, error)
- func SetupCommunication(commMap map[peer.ID]*TestCommunication)
- type CoordinatorTestSuite
- type Receiver
- type TestCommunication
- func (tc *TestCommunication) Broadcast(peers peer.IDSlice, msg []byte, msgType comm.MessageType, sessionID string) error
- func (ts *TestCommunication) CloseSession(sessionID string)
- func (ts *TestCommunication) ReceiveMessage(msg *comm.WrappedMessage, topic comm.MessageType, sessionID string)
- func (ts *TestCommunication) Subscribe(sessionID string, topic comm.MessageType, channel chan *comm.WrappedMessage) comm.SubscriptionID
- func (ts *TestCommunication) UnSubscribe(subscriptionID comm.SubscriptionID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupCommunication ¶
func SetupCommunication(commMap map[peer.ID]*TestCommunication)
Types ¶
type CoordinatorTestSuite ¶
type CoordinatorTestSuite struct {
suite.Suite
GomockController *gomock.Controller
MockECDSAStorer *mock_tss.MockECDSAKeyshareStorer
MockCommunication *mock_comm.MockCommunication
MockTssProcess *mock_tss.MockTssProcess
Hosts []host.Host
Threshold int
PartyNumber int
BullyConfig relayer.BullyConfig
}
func (*CoordinatorTestSuite) SetupTest ¶
func (s *CoordinatorTestSuite) SetupTest()
type Receiver ¶
type Receiver interface {
ReceiveMessage(msg *comm.WrappedMessage, topic comm.MessageType, sessionID string)
}
type TestCommunication ¶
type TestCommunication struct {
Host host.Host
Subscriptions map[comm.SubscriptionID]chan *comm.WrappedMessage
PeerCommunications map[string]Receiver
// contains filtered or unexported fields
}
func (*TestCommunication) Broadcast ¶
func (tc *TestCommunication) Broadcast( peers peer.IDSlice, msg []byte, msgType comm.MessageType, sessionID string, ) error
func (*TestCommunication) CloseSession ¶
func (ts *TestCommunication) CloseSession(sessionID string)
func (*TestCommunication) ReceiveMessage ¶
func (ts *TestCommunication) ReceiveMessage(msg *comm.WrappedMessage, topic comm.MessageType, sessionID string)
func (*TestCommunication) Subscribe ¶
func (ts *TestCommunication) Subscribe( sessionID string, topic comm.MessageType, channel chan *comm.WrappedMessage, ) comm.SubscriptionID
func (*TestCommunication) UnSubscribe ¶
func (ts *TestCommunication) UnSubscribe(subscriptionID comm.SubscriptionID)
Click to show internal directories.
Click to hide internal directories.