Documentation ¶
Index ¶
- type GroupConnection
- type P2PManager
- func (p2p *P2PManager) AddSession(session sesscommon.ISession)
- func (p2p *P2PManager) StartGetGroupKeySession(group ethcommon.Address, receiver *common.Contact, sender ethcommon.Address, ...) error
- func (p2p *P2PManager) StartGetProposedGroupKeySession(group ethcommon.Address, proposer ethcommon.Address, receiver *common.Contact, ...) error
- func (p2p *P2PManager) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupConnection ¶
type GroupConnection struct {
// contains filtered or unexported fields
}
GroupConnection is responsible for handling the group's IPFS pubsub subscription
func NewGroupConnection ¶
func NewGroupConnection( group interfaces.IGroup, repo *fs.GroupRepo, user interfaces.IAccount, addressBook *common.AddressBook, sessionClosed sesscommon.SessionClosedCallback, p2p *P2PManager, ipfs ipfsapi.IIpfs, ) *GroupConnection
NewGroupConnection creates a new GroupConnection
func (*GroupConnection) Broadcast ¶
func (conn *GroupConnection) Broadcast(msg []byte) error
Broadcast publishes a message to the group topic
func (*GroupConnection) Kill ¶
func (conn *GroupConnection) Kill()
Kill kills the group connection listener
type P2PManager ¶
type P2PManager struct {
// contains filtered or unexported fields
}
P2PManager is responsible for managing all the incoming libp2p connections
func NewP2PManager ¶
func NewP2PManager( port string, account interfaces.IAccount, signer common.Signer, addressBook *common.AddressBook, ctxCallback sesscommon.CtxCallback, ipfs ipfsapi.IIpfs, ) (*P2PManager, error)
NewP2PManager creates a new P2PManager
func (*P2PManager) AddSession ¶
func (p2p *P2PManager) AddSession(session sesscommon.ISession)
AddSession adds a session to the managers session list
func (*P2PManager) StartGetGroupKeySession ¶
func (p2p *P2PManager) StartGetGroupKeySession( group ethcommon.Address, receiver *common.Contact, sender ethcommon.Address, onSuccess sesscommon.OnGetGroupKeySuccessCallback, ) error
StartGetGroupKeySession start a new session for retrieving a group's current key
func (*P2PManager) StartGetProposedGroupKeySession ¶
func (p2p *P2PManager) StartGetProposedGroupKeySession( group ethcommon.Address, proposer ethcommon.Address, receiver *common.Contact, sender ethcommon.Address, onSuccess sesscommon.OnGetGroupKeySuccessCallback, ) error
StartGetProposedGroupKeySession starts a new session to get a specific proposed key of the group
func (*P2PManager) Stop ¶
func (p2p *P2PManager) Stop()
Stop gracefully kills all threads and processes
Click to show internal directories.
Click to hide internal directories.