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).
Click to show internal directories.
Click to hide internal directories.