github.com/annchain/OG@v0.0.9/consensus/dkg/interface.go (about) 1 package dkg 2 3 type DkgPeerCommunicatorOutgoing interface { 4 Broadcast(msg DkgMessage, peers []DkgPeer) 5 Unicast(msg DkgMessage, peer DkgPeer) 6 } 7 8 type DkgPeerCommunicatorIncoming interface { 9 GetPipeIn() chan *DkgMessageEvent 10 GetPipeOut() chan *DkgMessageEvent 11 } 12 13 type DkgGeneratedListener interface { 14 GetDkgGeneratedEventChannel() chan bool 15 } 16 17 type DkgPartner interface { 18 Start() 19 Stop() 20 GetDkgPeerCommunicatorIncoming() DkgPeerCommunicatorIncoming 21 RegisterDkgGeneratedListener(l DkgGeneratedListener) 22 }