waitgate

package
v0.220.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package waitgate holds the one time rule of the 「等我」 judgement: a turn that asks for a person must have been open for the grace period before it counts. The today queue (and so the inbox, home page and badge) and the workbench's attention both ask it, so a terminal turn and a managed ACP turn are held back by the same clock and the surfaces cannot disagree. It reads no state: callers pass the stored time the turn ended.

Index

Constants

View Source
const GraceSec = 300

GraceSec is how long a turn must have been open before it counts as "waiting for me": a turn that lasts less than this is usually answered at the keyboard before the person ever looks at the list.

Variables

This section is empty.

Functions

func Ripe

func Ripe(now, askedAt int64) (ripe bool, recheckAt int64)

Ripe reports whether a turn that ended (asked) at askedAt has waited out the grace period at now. When it has not, recheckAt is the unix second it will, so a client can refetch exactly then.

Types

This section is empty.

Jump to

Keyboard shortcuts

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