New creates a McastManager instance. Create a dummy manager when iface is empty string.
(logger *slog.Logger, iface string)
| 32 | // New creates a McastManager instance. Create a dummy manager when iface is empty |
| 33 | // string. |
| 34 | func New(logger *slog.Logger, iface string) *MCastManager { |
| 35 | return &MCastManager{ |
| 36 | logger: logger.With(logfields.LogSubsys, "mcast-manager"), |
| 37 | addresses: make(map[int32]map[netip.Addr]struct{}), |
| 38 | state: make(map[netip.Addr]struct{}), |
| 39 | iface: iface, |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // AddAddress is called when a new endpoint is added |
| 44 | func (mgr *MCastManager) AddAddress(ipv6 netip.Addr) { |