github.com/cilium/cilium@v1.16.2/pkg/maps/multicast/mcast.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package multicast 5 6 import ( 7 "github.com/cilium/hive/cell" 8 "github.com/spf13/pflag" 9 ) 10 11 const ( 12 // Multicast is the name of the flag to enable synthetic multicast. 13 Multicast = "multicast-enabled" 14 ) 15 16 var Cell = cell.Module( 17 "multicastmaps", 18 "Multicast Maps provides interfaces to the multicast data-path maps", 19 cell.Provide(NewGroupV4Map), 20 cell.Config(Config{}), 21 ) 22 23 type Config struct { 24 MulticastEnabled bool `mapstructure:"multicast-enabled"` 25 } 26 27 // Flags implements cell.Flagger interface. 28 func (cfg Config) Flags(flags *pflag.FlagSet) { 29 flags.Bool(Multicast, cfg.MulticastEnabled, "Enables multicast in Cilium") 30 }