garbagecollector

package
v0.0.0-...-367bcdf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Interval represent the interval to run Garabge Collection
	Interval time.Duration = 5 * time.Second
)

Variables

This section is empty.

Functions

func CascadeDeleteOptions

func CascadeDeleteOptions(gracePeriodSeconds int64) *metav1.DeleteOptions

CascadeDeleteOptions returns a DeleteOptions with Cascaded set

Types

type GarbageCollector

type GarbageCollector struct {
	// contains filtered or unexported fields
}

GarbageCollector represents a Workflow Garbage Collector. It collects orphaned Jobs

func NewGarbageCollector

func NewGarbageCollector(rcClient rclientset.Interface, kubeClient kclientset.Interface, rcInformerFactory rinformers.SharedInformerFactory) *GarbageCollector

NewGarbageCollector builds initializes and returns a GarbageCollector

func (*GarbageCollector) CollectRedisClusterGarbage

func (c *GarbageCollector) CollectRedisClusterGarbage() error

CollectRedisClusterGarbage collect the orphaned pods and services. First looking in the rediscluster informer list then retrieve from the API and in case NotFound then remove via DeleteCollection primitive

func (*GarbageCollector) InformerSync

func (c *GarbageCollector) InformerSync() cache.InformerSynced

InformerSync returns the rediscluster cache informer sync function

type Interface

type Interface interface {
	CollectRedisClusterGarbage() error
	InformerSync() cache.InformerSynced
}

Interface GarbageCollector interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL