hk

package
v1.3.22 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package hk provides mechanism for registering cleanup functions which are invoked at specified intervals.

  • Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.

Package hk provides mechanism for registering cleanup functions which are invoked at specified intervals.

  • Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.

Index

Constants

View Source
const (
	DelOldIval      = 8 * time.Minute // hk interval: cleanup old
	PruneActiveIval = 2 * time.Minute // hk interval: prune active

	OldAgeLso      = time.Minute      // when list-objects is considered old
	OldAgeLsoNotif = 10 * time.Second // notifications-wise
	OldAgeX        = time.Hour        // all other X
)
View Source
const (
	DayInterval   = 24 * time.Hour
	UnregInterval = 365 * DayInterval // to unregister upon return from the callback
)
View Source
const NameSuffix = ".gc" // reg name suffix

Variables

View Source
var DefaultHK *housekeeper

Functions

func Init

func Init(stopping *atomic.Bool)

func IsReg added in v1.3.20

func IsReg(name string) bool

func Reg

func Reg(name string, f hkcb, interval time.Duration)

func TestInit

func TestInit()

func Unreg

func Unreg(name string)

func WaitStarted

func WaitStarted()

Types

This section is empty.

Jump to

Keyboard shortcuts

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