Documentation
¶
Index ¶
- Constants
- Variables
- func BroadcastInRing(ctx *common.Context, cmd common.Command)
- func ForwardInRing(ctx *common.Context, from common.PeerAddr, cmd common.Command)
- func ReplyInRing(ctx *common.Context, from common.PeerAddr, cmd common.Command)
- func SendToDirectly(ctx *common.Context, destination common.PeerAddr, cmd common.Command) error
- func SendToHi(ctx *common.Context, cmd common.Command, report bool)
- func SendToHiReliable(ctx *common.Context, cmd common.Command)
- func SendToLo(ctx *common.Context, cmd common.Command, report bool)
- func SendToLoReliable(ctx *common.Context, cmd common.Command)
- func SendToReliable(ctx *common.Context, mainDest common.PeerAddr, altDest common.PeerAddr, ...)
- func SendToRingLeader(ctx *common.Context, cmd common.Command)
- func StartChRoTimer(ctx *common.Context)
- type DiscoveryServer
- type TcpServer
Constants ¶
View Source
const DEFAULT_TTL = 20
View Source
const MULTICAST_PORT = 7788
Variables ¶
View Source
var MULTICAST_ADDR = &net.UDPAddr{IP: MULTICAST_IP, Port: MULTICAST_PORT}
View Source
var MULTICAST_IP = net.IPv4(224, 0, 0, 64)
Functions ¶
func ForwardInRing ¶
func SendToDirectly ¶
func SendToReliable ¶
func StartChRoTimer ¶
Types ¶
type DiscoveryServer ¶
type DiscoveryServer struct {
// contains filtered or unexported fields
}
func NewDiscoveryServer ¶
func NewDiscoveryServer(ctx *common.Context, discoverResponse string, discoveryEventHandler func(discoverResponse string)) *DiscoveryServer
func (*DiscoveryServer) SendDiscoveryRequest ¶
func (s *DiscoveryServer) SendDiscoveryRequest()
func (*DiscoveryServer) SendDiscoveryRequestOn ¶
func (s *DiscoveryServer) SendDiscoveryRequestOn(iface *net.Interface)
func (*DiscoveryServer) StartOn ¶
func (s *DiscoveryServer) StartOn(iface *net.Interface)
Click to show internal directories.
Click to hide internal directories.