cleaner

package
v0.0.0-...-1230f5b Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecycleOne

func RecycleOne(client RecycleBoskosClient, res *common.Resource)

Types

type Cleaner

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

Cleaner looks for ToBeDeleted resources and mark them as Tombstone. It also releases resource hold by dynamic resources if any.

func NewCleaner

func NewCleaner(cleanerCount int, client boskosClient, waitPeriod time.Duration, s cleanerStorage) *Cleaner

NewCleaner creates and initialized a new Cleaner object In: cleanerCount - Number of cleaning threads

client            - boskos client
waitPeriod        - time to wait before a new boskos operation (acquire mostly)

Out: A Pointer to a Cleaner Object

func (*Cleaner) Start

func (c *Cleaner) Start()

Start Cleaner

func (*Cleaner) Stop

func (c *Cleaner) Stop()

Stop Cleaner

type RecycleBoskosClient

type RecycleBoskosClient interface {
	AcquireByState(state, dest string, names []string) ([]common.Resource, error)
	ReleaseOne(name, dest string) error
	UpdateOne(name, state string, userData *common.UserData) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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