multicast

package
v0.0.0-...-102eb4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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) IsProbing

func (m *MulticastManager) IsProbing() bool

FINISH ME

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) Stop

func (m *MulticastManager) Stop()

FINISH ME

func (*MulticastManager) StopProbing

func (m *MulticastManager) StopProbing()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL