MCPcopy
hub / github.com/cilium/cilium / New

Function New

pkg/mcastmanager/mcastmanager.go:34–41  ·  view source on GitHub ↗

New creates a McastManager instance. Create a dummy manager when iface is empty string.

(logger *slog.Logger, iface string)

Source from the content-addressed store, hash-verified

32// New creates a McastManager instance. Create a dummy manager when iface is empty
33// string.
34func 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
44func (mgr *MCastManager) AddAddress(ipv6 netip.Addr) {

Callers 3

NewFunction · 0.92
TestAddRemoveEndpointFunction · 0.70
TestAddRemoveNilFunction · 0.70

Calls 1

WithMethod · 0.65

Tested by 2

TestAddRemoveEndpointFunction · 0.56
TestAddRemoveNilFunction · 0.56