github.com/cilium/cilium@v1.16.2/pkg/maps/ctmap/gc/cell.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright Authors of Cilium
     3  
     4  package gc
     5  
     6  import (
     7  	"github.com/cilium/hive/cell"
     8  
     9  	"github.com/cilium/cilium/pkg/endpointmanager"
    10  )
    11  
    12  var Cell = cell.Module(
    13  	"ct-nat-map-gc",
    14  	"Garbage collection of CT and NAT maps",
    15  
    16  	cell.Provide(
    17  		// Provide the interface uses to start the GC logic. This hack
    18  		// should be removed once all dependencies have been modularized,
    19  		// and we can start the GC through a Start hook.
    20  		func(gc *GC) Enabler { return gc },
    21  	),
    22  
    23  	cell.ProvidePrivate(
    24  		New,
    25  
    26  		// Register the signal handler for CT and NAT fill-up signals.
    27  		newSignalHandler,
    28  		// Provide the reduced interface used by the GC logic.
    29  		func(mgr endpointmanager.EndpointManager) EndpointManager { return mgr },
    30  	),
    31  )