multicast

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: LGPL-3.0 Imports: 20 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetMulticastInterfacesRequest added in v0.4.0

type GetMulticastInterfacesRequest struct{}

type GetMulticastInterfacesResponse added in v0.4.0

type GetMulticastInterfacesResponse struct {
	Interfaces []string `json:"multicast_interfaces"`
}

type GroupAddress added in v0.4.5

type GroupAddress string

type Multicast

type Multicast struct {
	phony.Inbox
	// contains filtered or unexported fields
}

Multicast represents the multicast advertisement and discovery mechanism used by Yggdrasil to find peers on the same subnet. When a beacon is received on a configured multicast interface, Yggdrasil will attempt to peer with that node automatically.

func New added in v0.4.5

func New(core *core.Core, log *log.Logger, opts ...SetupOption) (*Multicast, error)

Start starts the multicast interface. This launches goroutines which will listen for multicast beacons from other hosts and will advertise multicast beacons out to the network.

func (*Multicast) AnnounceNow added in v0.4.7

func (m *Multicast) AnnounceNow()

func (*Multicast) Interfaces

func (m *Multicast) Interfaces() map[string]net.Interface

func (*Multicast) IsStarted added in v0.3.14

func (m *Multicast) IsStarted() bool

IsStarted returns true if the module has been started.

func (*Multicast) SetupAdminHandlers

func (m *Multicast) SetupAdminHandlers(a *admin.AdminSocket)

func (*Multicast) Stop

func (m *Multicast) Stop() error

Stop stops the multicast module.

type MulticastInterface added in v0.4.5

type MulticastInterface struct {
	Regex    *regexp.Regexp
	Beacon   bool
	Listen   bool
	Port     uint16
	Priority uint8
	Password string
}

type SetupOption added in v0.4.5

type SetupOption interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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