Documentation ¶
Index ¶
- Constants
- type Config
- type MessageMode
- type MulticastManager
- func (m *MulticastManager) IsProbing() bool
- func (m *MulticastManager) Multicast(c *Config) error
- func (m *MulticastManager) ProbeNetwork(mode MessageMode) error
- func (m *MulticastManager) RegisterProbeMessage(msg *pb.Message)
- func (m *MulticastManager) ResetMulticastTimer()
- func (m *MulticastManager) Stop()
- func (m *MulticastManager) StopProbing()
Constants ¶
View Source
const ( // Send direct messages to a subset of the least recently used members LruMembers = 'A' // Send direct messages to a random set of members RandomMembers = 'B' )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Sets the behaviour of the message passing Mode MessageMode // The members at the time the message passing is invoked Members []string }
type MessageMode ¶
type MessageMode byte
type MulticastManager ¶
type MulticastManager struct { // Channel into which policies are inserted to be multicasted in the next batch PolicyChan chan pb.Policy // contains filtered or unexported fields }
Maintains all gossip-related events
func NewMulticastManager ¶
func NewMulticastManager(ifritClient *ifrit.Client, acceptanceLevel float64, multicastDirectRecipients int) (*MulticastManager, error)
Returns a new MulticastManager, given the Ifrit node and the configuration. Sigma and tau are initial values that may be changed after initiating probing sessions. The values will be adjusted if they are higher than they should be.
func (*MulticastManager) Multicast ¶
func (m *MulticastManager) Multicast(c *Config) error
Sends a batch of messages, given the messaging mode. The call will block until all messages have been dispatched. The caller is responsible to wait until probing is finished to avoid inconsistency. See IsProbing() in this package.
func (*MulticastManager) ProbeNetwork ¶
func (m *MulticastManager) ProbeNetwork(mode MessageMode) error
Probes the network to adjust the parameters
func (*MulticastManager) RegisterProbeMessage ¶
func (m *MulticastManager) RegisterProbeMessage(msg *pb.Message)
Registers the given message as a probe message
func (*MulticastManager) ResetMulticastTimer ¶
func (m *MulticastManager) ResetMulticastTimer()
func (*MulticastManager) StopProbing ¶
func (m *MulticastManager) StopProbing()
Click to show internal directories.
Click to hide internal directories.