v2.31.0-dev12 6a38a35

images.go RawHistoryFolder

1package domain
2
3import "time"
4
5const DefaultImagePruneKeepLast = 3
6
7// ImagePruneOptions controls which prune subsystems are activated.
8type ImagePruneOptions struct {
9	// KeepLast is the number of most-recent non-latest tags to retain per repository.
10	KeepLast int
11	// PruneDangling enables runtime dangling image cleanup.
12	PruneDangling bool
13	// PruneRegistry enables registry tag retention and blob garbage collection.
14	PruneRegistry bool
15}
16
17// DefaultImagePruneOptions returns options that prune both scopes with the default retention.
18func DefaultImagePruneOptions() ImagePruneOptions {
19	return ImagePruneOptions{
20		KeepLast:      DefaultImagePruneKeepLast,
21		PruneDangling: true,
22		PruneRegistry: true,
23	}
24}
25
26// ImagePruneConfig defines scheduled image cleanup behavior.
27type ImagePruneConfig struct {
28	Enabled  bool
29	Schedule BackupSchedule
30	// KeepLast is the number of most-recent non-latest tags to retain per repository.
31	// The latest tag is retained separately when present.
32	KeepLast int
33}
34
35// RuntimePruneResult reports runtime image cleanup results.
36type RuntimePruneResult struct {
37	DeletedCount int
38	// SpaceReclaimed is reported in bytes.
39	SpaceReclaimed int64
40}
41
42// RegistryPruneResult reports registry cleanup results.
43type RegistryPruneResult struct {
44	TagsRemoved  int
45	BlobsRemoved int
46	// SpaceReclaimed is reported in bytes.
47	SpaceReclaimed int64
48	// UploadsRemoved is the number of stale upload files removed.
49	UploadsRemoved int
50	// UploadSpaceReclaimed is bytes recovered from stale uploads.
51	UploadSpaceReclaimed int64
52}
53
54// ImagePruneReport aggregates runtime and registry cleanup results.
55type ImagePruneReport struct {
56	Runtime  RuntimePruneResult
57	Registry RegistryPruneResult
58}
59
60// ImageInfo describes an image/tag visible from runtime and registry data.
61type ImageInfo struct {
62	Repository string
63	Tag        string
64	// Size is reported in bytes.
65	Size    int64
66	Created time.Time
67	// ID is the runtime image identifier (for example, image ID/digest).
68	ID       string
69	Dangling bool
70}

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 7

Tags 106

↑↓ moveenter openesc close