Documentation ¶
Overview ¶
Package gossip defines an abstraction to gossip messages to a defined set of participants.
Documentation Last Review: 06.10.2020
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor interface { // SetPlayers changes the list of participants that the actor should send // rumors to. It is up to the implementation to send to only a subset. SetPlayers(mino.Players) // Add adds the rumor in the set of rumors that must be spread to the // participants. Add(rumor Rumor) error // Close cleans any resource used by the actor. Close() error }
Actor is an actor that can send rumor to a gossip network.
type Flat ¶
Flat is an implementation of a message passing protocol that is using a flat communication approach by sending a rumor to all the known participants.
- implements gossip.Gossiper
type Gossiper ¶
type Gossiper interface { // Rumors returns a channel populated with the new rumors. Rumors() <-chan Rumor // Listen starts to listen for rumors and returns a gossip actor. Listen() (Actor, error) }
Gossiper is an abstraction of a message passing protocol that uses internally a gossip protocol.
Click to show internal directories.
Click to hide internal directories.