rediskeys

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package rediskeys defines all Redis key patterns for the k8s-agents system. Imported by both the MCP server (cmd/mcp/) and aimux's K8s provider. Single source of truth for key naming — never duplicate these strings elsewhere.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Agent

func Agent(teamID, agentID string) string

Agent returns the hash key for a specific agent's metadata. Type: Hash. Fields: provider, role, model, namespace, pod_name, registered_at.

func Config

func Config(teamID string) string

Config returns the team configuration hash. Type: Hash. Fields: name, description, members (JSON).

func Cost

func Cost(teamID, agentID string) string

Cost returns the cost hash for a specific agent. Type: Hash. Fields: tokens_in, tokens_out, model. Incremented via HINCRBY.

func Events

func Events(teamID string) string

Events returns the broadcast events stream key. Type: Stream. MAXLEN ~10000. Fields: from, text, type, summary, timestamp.

func Heartbeat

func Heartbeat(teamID string) string

Heartbeat returns the heartbeat hash for the team. Type: Hash. Field = agent ID, value = unix timestamp (updated every 10s).

func Inbox

func Inbox(teamID, agentID string) string

Inbox returns the per-agent inbox stream key. Type: Stream. MAXLEN ~1000. Fields: from, text, summary, type, timestamp.

func Task

func Task(teamID, taskID string) string

Task returns the hash key for a specific task. Type: Hash. Fields: status, prompt, required_role, assignee, depends_on (JSON),

result_summary, result_ref, source_branch, retry_count, error,
created_at, completed_at.

func TasksAll

func TasksAll(teamID string) string

TasksAll returns the sorted set of all task IDs (pending + claimed + completed). Type: Sorted Set. Score = creation unix timestamp. Members = task IDs. Used by list_tasks for ordered listing without SCAN.

func TasksPending

func TasksPending(teamID string) string

TasksPending returns the sorted set of pending task IDs. Type: Sorted Set. Score = creation unix timestamp. Members = task IDs.

func TeamKey

func TeamKey(teamID, suffix string) string

TeamKey is the base key constructor. All other functions call this. Format: team:{teamID}:{suffix}

Types

This section is empty.

Jump to

Keyboard shortcuts

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