cooldown

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package cooldown manages per-session tombstone files to suppress repeated agent output within a configurable duration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Active

func Active(session string, cooldown time.Duration) bool

Active checks whether the cooldown tombstone for the given session is still fresh.

Parameters:

  • session: session identifier (typically the caller's PID)
  • cooldown: duration to suppress repeated output

Returns:

  • bool: true if tombstone exists and is within the cooldown window

func TombstonePath

func TombstonePath(session string) string

TombstonePath returns the filesystem path for a session's tombstone.

Parameters:

  • session: session identifier

Returns:

  • string: absolute path in the system temp directory

func TouchTombstone

func TouchTombstone(session string)

TouchTombstone creates or updates the tombstone file for the given session, marking the current time as the last emission.

Parameters:

  • session: session identifier (typically the caller's PID)

Types

This section is empty.

Jump to

Keyboard shortcuts

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