resourceclean

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

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

func (*Chain) Delete

func (c *Chain) Delete(ctx context.Context) error

func (*Chain) Initialize

func (c *Chain) Initialize(client client.Client, ds store.IStore)

func (*Chain) Name

func (c *Chain) Name() string

type CleanReconciler

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

CleanReconciler is a struct that represents a set of cleaners used to clean deleted resources from onex db.

func NewCleanReconciler

func NewCleanReconciler(client client.Client, ds store.IStore, cleaners ...Cleaner) *CleanReconciler

NewCleanReconciler return a cleaner set used to clean deleted resources from onex db.

func (*CleanReconciler) Start

func (r *CleanReconciler) Start(ctx context.Context) error

Start starts the Cleaner and runs the SyncAll() method periodically.

func (*CleanReconciler) SyncAll

func (r *CleanReconciler) SyncAll(ctx context.Context)

SyncAll runs the Sync() method of all registered cleaners.

type Cleaner

type Cleaner interface {
	// Name returns the name of the cleaner.
	Name() string

	// Delete performs the deletion operation.
	Delete(ctx context.Context) error

	// Initialize initializes the cleaner with the provided client and store client.
	Initialize(client client.Client, storeClient store.IStore)
}

Cleaner interface defines the methods required for a cleaner implementation.

type Miner

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

func (*Miner) Delete

func (c *Miner) Delete(ctx context.Context) error

func (*Miner) Initialize

func (c *Miner) Initialize(client client.Client, ds store.IStore)

func (*Miner) Name

func (c *Miner) Name() string

type MinerSet

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

func (*MinerSet) Delete

func (c *MinerSet) Delete(ctx context.Context) error

func (*MinerSet) Initialize

func (c *MinerSet) Initialize(client client.Client, ds store.IStore)

func (*MinerSet) Name

func (c *MinerSet) Name() string

Jump to

Keyboard shortcuts

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