api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package api will be the retention module's published interface: cleanup policies, archive policies and restores. Today it holds RunStatus, the status of a cleanup or smart-archiving run.

Role

retention module, api layer. It may import only kernel, platform/outbox and its own api subpackages (decision 0044, dependency rules). RunStatus is declared here, not in the module's core/model, because federation's full-sync runs report the same statuses, and a module imports another only through that module's api.

Inputs

None. An api package declares contracts; its callers are other modules and the gateways.

Outputs

  • RunStatus with its ten Run* statuses and Terminal. The retention model's CleanupRun and the federation model's FullSyncRun report it.

Planned (target layout, line 327): retention.go with the CleanupPolicies, ArchivePolicies and Restores contracts.

Invariants

  • The statuses are JFrog's strings and are stored, so they never change. Terminal is true only for COMPLETED, COMPLETED_WITH_ERRORS, STOPPED and FAILED: a run in any other status may still change.

References

Status

Implemented P2: RunStatus among the shared domain types (pull request 3). Moved here in P9d. The contracts arrive with P11 and P16.

Testing

The retention model's TestUnitRunStatusTerminal checks which statuses are final, and the metadata store's CleanupRuns and FullSyncs contract subtests store and read them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunStatus

type RunStatus string

RunStatus is the status of a cleanup or smart-archiving run.

const (
	RunInProgress           RunStatus = "IN_PROGRESS"
	RunInProgressWithErrors RunStatus = "IN_PROGRESS_WITH_ERRORS"
	RunCompleted            RunStatus = "COMPLETED"
	RunCompletedWithErrors  RunStatus = "COMPLETED_WITH_ERRORS"
	RunStopped              RunStatus = "STOPPED"
	RunStopping             RunStatus = "STOPPING"
	RunFailed               RunStatus = "FAILED"
	RunPendingWarm          RunStatus = "PENDING_WARM"
	RunPartialWarmed        RunStatus = "PARTIAL_WARMED"
	RunWarmed               RunStatus = "WARMED"
)

Run statuses as JFrog reports them.

func (RunStatus) Terminal

func (s RunStatus) Terminal() bool

Terminal reports whether a run in this status will not change again.

Jump to

Keyboard shortcuts

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