Documentation
¶
Overview ¶
Package usage computes the storage summary (GET /api/storageinfo): blob totals, item totals per repository and for the trash can, and the capacity of the volume a local blob store lives on. It is computed on every request rather than cached, so it never lags writes.
Index ¶
Constants ¶
const DefaultProject = "default"
DefaultProject is the project key of a repository in no project.
const NoFilesystem = "Filesystem storage is not used"
NoFilesystem is the directory Artifactory reports for a binary provider chain with no file-system or cache-fs provider in it, as an object store is here: it keeps no local copy (6.20's StorageSummaryImpl).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Location ¶
type Location struct {
// Type names the store as Artifactory names a binary provider chain:
// its template, such as file-system or s3-storage-v3-direct, or
// user-chain for a chain no template describes.
Type string
// Directory is the root directory, NoFilesystem for an object store, or
// the mirror's members.
Directory string
// Root is the local directory whose volume reports capacity; empty for
// object storage, whose capacity is unknown.
Root string
}
Location describes the hot blob store for the summary.
type Row ¶
type Row struct {
Key string
// Type is LOCAL, CACHE, VIRTUAL or FEDERATED, or NA for the trash can.
Type string
// PackageType is empty for the trash can.
PackageType repo.PackageType
// ProjectKey is DefaultProject for a repository in no project and for
// the trash can.
ProjectKey string
Files int64
Folders int64
Bytes int64
}
Row is one repository's line, a remote repository's cache under its "<key>-cache" alias, or the trash can's.
type Summary ¶
type Summary struct {
BinariesCount, BinariesSize int64
// ArtifactsCount and ArtifactsSize count every file as stored before
// deduplication, the trash can's included; ItemsCount adds the folders.
ArtifactsCount, ArtifactsSize, ItemsCount int64
Location Location
// Space is nil when the capacity is unknown.
Space *Space
// Rows are sorted by key, the trash can's among them.
Rows []Row
}
Summary is the storage summary.