hk

package
v1.3.27 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

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

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

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

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

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

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

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

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

Index

Constants

View Source
const (
	DelOldIval      = 24 * time.Minute // hk timer: cleanup old xactions; old transactions
	PruneActiveIval = 2 * time.Minute  // hk timer: prune active xactions; cleanup notifs

	//
	// when things are considered _old_
	//
	OldAgeLsoX     = time.Minute      // x-lso
	OldAgeX        = time.Hour        // all other xactions
	OldAgeNotif    = 3 * time.Minute  // old notifications
	OldAgeNotifLso = 10 * time.Second // note: seconds
)
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 HK *hk

singleton

Functions

func Init

func Init(mustRun bool)

func Reg

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

func Unreg

func Unreg(name string)

func UnregIf added in v1.3.24

func UnregIf(name string, f hkcb)

non-presence is fine

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