NewGarbageCollector
Creates a new GarbageCollector instance, initializing it with a Kubernetes client, an interval for garbage collection runs, and a maximum time-to-live (TTL) for resources.
def NewGarbageCollector(
c: client.Client,
interval: time.Duration,
maxTTL: time.Duration
) - > *GarbageCollector
Creates a new GarbageCollector instance. This function initializes a GarbageCollector with the provided client, interval, and maximum time-to-live (TTL) settings.
Parameters
| Name | Type | Description |
|---|---|---|
| c | client.Client | The client interface used by the GarbageCollector to interact with external services or resources. |
| interval | time.Duration | The duration between successive garbage collection runs. |
| maxTTL | time.Duration | The maximum time-to-live for items managed by the GarbageCollector. Items older than this duration will be considered for collection. |
Returns
| Type | Description |
|---|---|
*GarbageCollector | A pointer to a newly created GarbageCollector instance. |