Run gofmt 1.19
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
//
|
||||
// Generically, we try to do the following:
|
||||
//
|
||||
// <version>/<namespace>/<object>/<key> -> <field>
|
||||
// <version>/<namespace>/<object>/<key> -> <field>
|
||||
//
|
||||
// version: Currently, this is "v1". Additions can be made to v1 in a backwards
|
||||
// compatible way. If the layout changes, a new version must be made, along
|
||||
@@ -46,77 +46,80 @@
|
||||
// the structure is changed in addition to adding a migration and incrementing
|
||||
// the database version.
|
||||
// Notes:
|
||||
// * `╘══*...*` refers to maps with arbitrary keys
|
||||
// * `version` is a key to a numeric value identifying the minor revisions
|
||||
// of schema version
|
||||
// * a namespace in a schema bucket cannot be named "version"
|
||||
//
|
||||
// └──v1 - Schema version bucket
|
||||
// - `╘══*...*` refers to maps with arbitrary keys
|
||||
//
|
||||
// - `version` is a key to a numeric value identifying the minor revisions
|
||||
// of schema version
|
||||
//
|
||||
// - a namespace in a schema bucket cannot be named "version"
|
||||
//
|
||||
// └──v1 - Schema version bucket
|
||||
// ├──version : <varint> - Latest version, see migrations
|
||||
// ╘══*namespace*
|
||||
// ├──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──image
|
||||
// │ ╘══*image name*
|
||||
// │ ├──createdat : <binary time> - Created at
|
||||
// │ ├──updatedat : <binary time> - Updated at
|
||||
// │ ├──target
|
||||
// │ │ ├──digest : <digest> - Descriptor digest
|
||||
// │ │ ├──mediatype : <string> - Descriptor media type
|
||||
// │ │ └──size : <varint> - Descriptor size
|
||||
// │ └──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──containers
|
||||
// │ ╘══*container id*
|
||||
// │ ├──createdat : <binary time> - Created at
|
||||
// │ ├──updatedat : <binary time> - Updated at
|
||||
// │ ├──spec : <binary> - Proto marshaled spec
|
||||
// │ ├──image : <string> - Image name
|
||||
// │ ├──snapshotter : <string> - Snapshotter name
|
||||
// │ ├──snapshotKey : <string> - Snapshot key
|
||||
// │ ├──runtime
|
||||
// │ │ ├──name : <string> - Runtime name
|
||||
// │ │ ├──extensions
|
||||
// │ │ │ ╘══*name* : <binary> - Proto marshaled extension
|
||||
// │ │ └──options : <binary> - Proto marshaled options
|
||||
// │ └──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──snapshots
|
||||
// │ ╘══*snapshotter*
|
||||
// │ ╘══*snapshot key*
|
||||
// │ ├──name : <string> - Snapshot name in backend
|
||||
// │ ├──createdat : <binary time> - Created at
|
||||
// │ ├──updatedat : <binary time> - Updated at
|
||||
// │ ├──parent : <string> - Parent snapshot name
|
||||
// │ ├──children
|
||||
// │ │ ╘══*snapshot key* : <nil> - Child snapshot reference
|
||||
// │ └──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──content
|
||||
// │ ├──blob
|
||||
// │ │ ╘══*blob digest*
|
||||
// │ │ ├──createdat : <binary time> - Created at
|
||||
// │ │ ├──updatedat : <binary time> - Updated at
|
||||
// │ │ ├──size : <varint> - Blob size
|
||||
// │ │ └──labels
|
||||
// │ │ ╘══*key* : <string> - Label value
|
||||
// │ └──ingests
|
||||
// │ ╘══*ingest reference*
|
||||
// │ ├──ref : <string> - Ingest reference in backend
|
||||
// │ ├──expireat : <binary time> - Time to expire ingest
|
||||
// │ └──expected : <digest> - Expected commit digest
|
||||
// └──leases
|
||||
// ╘══*lease id*
|
||||
// ├──createdat : <binary time> - Created at
|
||||
// ├──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──snapshots
|
||||
// │ ╘══*snapshotter*
|
||||
// │ ╘══*snapshot key* : <nil> - Snapshot reference
|
||||
// ├──content
|
||||
// │ ╘══*blob digest* : <nil> - Content blob reference
|
||||
// └──ingests
|
||||
// ╘══*ingest reference* : <nil> - Content ingest reference
|
||||
// ├──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──image
|
||||
// │ ╘══*image name*
|
||||
// │ ├──createdat : <binary time> - Created at
|
||||
// │ ├──updatedat : <binary time> - Updated at
|
||||
// │ ├──target
|
||||
// │ │ ├──digest : <digest> - Descriptor digest
|
||||
// │ │ ├──mediatype : <string> - Descriptor media type
|
||||
// │ │ └──size : <varint> - Descriptor size
|
||||
// │ └──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──containers
|
||||
// │ ╘══*container id*
|
||||
// │ ├──createdat : <binary time> - Created at
|
||||
// │ ├──updatedat : <binary time> - Updated at
|
||||
// │ ├──spec : <binary> - Proto marshaled spec
|
||||
// │ ├──image : <string> - Image name
|
||||
// │ ├──snapshotter : <string> - Snapshotter name
|
||||
// │ ├──snapshotKey : <string> - Snapshot key
|
||||
// │ ├──runtime
|
||||
// │ │ ├──name : <string> - Runtime name
|
||||
// │ │ ├──extensions
|
||||
// │ │ │ ╘══*name* : <binary> - Proto marshaled extension
|
||||
// │ │ └──options : <binary> - Proto marshaled options
|
||||
// │ └──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──snapshots
|
||||
// │ ╘══*snapshotter*
|
||||
// │ ╘══*snapshot key*
|
||||
// │ ├──name : <string> - Snapshot name in backend
|
||||
// │ ├──createdat : <binary time> - Created at
|
||||
// │ ├──updatedat : <binary time> - Updated at
|
||||
// │ ├──parent : <string> - Parent snapshot name
|
||||
// │ ├──children
|
||||
// │ │ ╘══*snapshot key* : <nil> - Child snapshot reference
|
||||
// │ └──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──content
|
||||
// │ ├──blob
|
||||
// │ │ ╘══*blob digest*
|
||||
// │ │ ├──createdat : <binary time> - Created at
|
||||
// │ │ ├──updatedat : <binary time> - Updated at
|
||||
// │ │ ├──size : <varint> - Blob size
|
||||
// │ │ └──labels
|
||||
// │ │ ╘══*key* : <string> - Label value
|
||||
// │ └──ingests
|
||||
// │ ╘══*ingest reference*
|
||||
// │ ├──ref : <string> - Ingest reference in backend
|
||||
// │ ├──expireat : <binary time> - Time to expire ingest
|
||||
// │ └──expected : <digest> - Expected commit digest
|
||||
// └──leases
|
||||
// ╘══*lease id*
|
||||
// ├──createdat : <binary time> - Created at
|
||||
// ├──labels
|
||||
// │ ╘══*key* : <string> - Label value
|
||||
// ├──snapshots
|
||||
// │ ╘══*snapshotter*
|
||||
// │ ╘══*snapshot key* : <nil> - Snapshot reference
|
||||
// ├──content
|
||||
// │ ╘══*blob digest* : <nil> - Content blob reference
|
||||
// └──ingests
|
||||
// ╘══*ingest reference* : <nil> - Content ingest reference
|
||||
package metadata
|
||||
|
||||
import (
|
||||
|
||||
@@ -274,11 +274,11 @@ func (m *DB) RegisterMutationCallback(fn func(bool)) {
|
||||
// to be tracked by go away after reboot or process restart.
|
||||
//
|
||||
// A few limitations to consider:
|
||||
// - Collectible Resources cannot reference other resources.
|
||||
// - A failure to complete collection will not fail the garbage collection,
|
||||
// however, the resources can be collected in a later run.
|
||||
// - Collectible Resources must track whether the resource is active and/or
|
||||
// lease membership.
|
||||
// - Collectible Resources cannot reference other resources.
|
||||
// - A failure to complete collection will not fail the garbage collection,
|
||||
// however, the resources can be collected in a later run.
|
||||
// - Collectible Resources must track whether the resource is active and/or
|
||||
// lease membership.
|
||||
func (m *DB) RegisterCollectibleResource(t gc.ResourceType, c Collector) {
|
||||
if t < resourceEnd {
|
||||
panic("cannot re-register metadata resource")
|
||||
|
||||
Reference in New Issue
Block a user