queues

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: BSD-3-Clause Imports: 9 Imported by: ? 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 queues builds the lease queue view: who waits in line for which resource, behind whom. It only reads agentsync's lock directory (<claude dir>/agentsync/locks) through agentsync's own reader, lease.ReadLines, which says what it could not read; it never writes a queue or a lease and never calls claim or release.

Index

Constants

View Source
const DefaultIdle = 15 * time.Minute

DefaultIdle is agentsync's default idle limit: how long a holder may do nothing with its lease before another session may take it.

Variables

This section is empty.

Functions

func Build

func Build(cfg Config) *model.Queues

Build reads the queues now.

func Dir

func Dir(claudeDir string) string

Dir is the lock directory under a Claude directory.

Types

type Config

type Config struct {
	ClaudeDir string        // ~/.claude
	Idle      time.Duration // zero takes DefaultIdle
	Now       func() time.Time
}

Config is where the engine reads.

type Source

type Source struct {
	Inner interface{ Snapshot() model.Snapshot }
	Cfg   Config
}

Source adds the queue view to the snapshots of an inner source. Reading is a few small local files, so it is done at each snapshot.

func (Source) Snapshot

func (s Source) Snapshot() model.Snapshot

Snapshot is the inner snapshot with the Queues view attached.

Jump to

Keyboard shortcuts

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