gateway

package
v0.99.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package gateway is CapGateway: create/wait local CLI jobs claimed by cmd/gateway.

Index

Constants

View Source
const (
	OpRun    = "run"
	OpHealth = "health"
	OpCancel = "cancel"
)

Variables

This section is empty.

Functions

func CatalogSpec

func CatalogSpec() capability.Spec

CatalogSpec returns capability metadata for documentation (handlers must not be invoked).

func Register

func Register() error

Register registers CapGateway when gateway.enabled is true and a JobStore is set.

func SetJobStore

func SetJobStore(s JobStore)

SetJobStore injects the gateway job store used by CapGateway handlers.

Types

type JobStore

type JobStore interface {
	Create(ctx context.Context, in types.GatewayCreateJob) (*types.GatewayJob, error)
	Get(ctx context.Context, jobID string) (*types.GatewayJob, error)
	Cancel(ctx context.Context, jobID string) (*types.GatewayJob, error)
	HasFreshWorker(ctx context.Context, staleAfter time.Duration) (bool, error)
	ReclaimExpired(ctx context.Context) error
}

JobStore is the persistence port for CapGateway (injected from internal/server).

Jump to

Keyboard shortcuts

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