detached ece7682

remote_runtime.go RawHistoryFolder

1package ports
2
3import (
4	"context"
5	"time"
6
7	"github.com/bnema/vev/internal/domain"
8	"github.com/bnema/vev/internal/protocol/catalogue"
9)
10
11// RemoteJobKind identifies one bounded unit of remote infrastructure work.
12// Jobs and results are typed tagged values with request identity, not
13// callbacks or raw frames.
14type RemoteJobKind uint8
15
16const (
17	RemoteJobRegistryRead RemoteJobKind = iota + 1
18	RemoteJobCacheLoad
19	RemoteJobCatalogObserve
20	RemoteJobCacheStore
21)
22
23// RemoteJob is one admitted unit of remote work. Registration and Generation
24// fence the job: results bound to a superseded registration never apply.
25// Deadline bounds catalogue observation; Entries carries cache-store payload.
26type RemoteJob struct {
27	Kind         RemoteJobKind
28	Endpoint     string
29	Registration domain.RemoteRegistration
30	Generation   domain.RemoteGeneration
31	Deadline     time.Duration
32	Entries      []catalogue.RemoteCatalogCacheEntry
33}
34
35// RemoteJobResult is exactly one completion for an admitted job: success,
36// failure or cancellation. Exactly one result retires one admission credit.
37// FailureKind carries the runtime's sanitized classification; Err preserves
38// the cause for errors.Is/As callers.
39type RemoteJobResult struct {
40	Kind          RemoteJobKind
41	Endpoint      string
42	Registration  domain.RemoteRegistration
43	Generation    domain.RemoteGeneration
44	FailureKind   domain.RemoteFailureKind
45	Catalog       catalogue.RemoteCatalog
46	Registrations []domain.RemoteRegistration
47	Entries       []catalogue.RemoteCatalogCacheEntry
48	Err           error
49}
50
51// RemoteRuntime is the bounded infrastructure seam executing remote jobs. It
52// owns subprocesses, storage calls and per-lane dispatch; workers never call
53// into the use case. A successful job-channel send transfers exactly one
54// admission credit until exactly one completion. Dispatch never blocks
55// forwarding into an occupied lane; cancelled completions select on context
56// cancellation.
57type RemoteRuntime interface {
58	Run(ctx context.Context, jobs <-chan RemoteJob, results chan<- RemoteJobResult) error
59}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close