job

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package job is the console-facing JobService handler: the daemon's CONTROL surface, the mutating sibling of the read-only activity/status/viewer handlers. Its RPCs submit background maintenance jobs (graph sync, activity-trail rotate, cache clear) through the same fire-and-forget, coalescing proc mechanism the CLI's `server job` uses, so a double-click never starts a second copy. Each response carries a metadata snapshot - the job's running state, its last completed run (from the activity trail), and the current size of what it maintains - so a caller renders a job's state in one round trip. The daemon mounts it behind the bearer guard; it is never served unauthenticated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements jobv1alpha1connect.JobServiceHandler. It submits jobs to the daemon's own proc socket (self-dial, so it rides the exact coalescing/journal path an external submit would) and reads the workspace trail + cache for the metadata it returns.

func NewService

func NewService(ws workspace, version string) *Service

NewService builds a JobService handler over the workspace ws, submitting jobs as version.

func (*Service) ListJobs

ListJobs returns every registered job with its running state, last run, and target size.

func (*Service) RunJob added in v0.4.0

RunJob submits the named job. An unregistered name is NotFound rather than a SubmitState: the enum reports how a valid submission resolved, and a name nobody registered never became one. That is also why this is the only RPC that can reject its input - the four verbs it replaced took no argument, so they had nothing to get wrong.

Jump to

Keyboard shortcuts

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