Versions in this module Expand all Collapse all v1 v1.7.0 Oct 31, 2022 v1.6.9 Oct 23, 2022 Changes in this version + const ResourceContainer + const ResourceContent + const ResourceIngest + const ResourceLease + const ResourceSnapshot + const ResourceTask + const ResourceUnknown + var EnableEtcdGC bool + var KeyAnnotations = "annotations" + var KeyChildren = "children" + var KeyCreatedAt = "createdat" + var KeyDBVersion = "version" + var KeyDigest = "digest" + var KeyDirty = "dirty" + var KeyDirtyCS = "dirtyCS" + var KeyDirtySS = "dirtySS" + var KeyExpected = "expected" + var KeyExpireAt = "expireat" + var KeyExtensions = "extensions" + var KeyImage = "image" + var KeyLock = "lock" + var KeyLowerdir = "lowerdir" + var KeyMediaType = "mediatype" + var KeyName = "name" + var KeyNil = "1" + var KeyObjectBlob = "blob" + var KeyObjectContainers = "containers" + var KeyObjectContent = "content" + var KeyObjectImages = "images" + var KeyObjectIngests = "ingests" + var KeyObjectLabels = "labels" + var KeyObjectLeases = "leases" + var KeyObjectNamespace = "namespaces" + var KeyObjectSandboxes = "sandboxes" + var KeyObjectSnapshots = "snapshots" + var KeyOptions = "options" + var KeyParent = "parent" + var KeyRef = "ref" + var KeyRuntime = "runtime" + var KeySandboxID = "sandboxid" + var KeySchedulerVersion = "scheduler.v1" + var KeySize = "size" + var KeySnapshotKey = "snapshotKey" + var KeySnapshotter = "snapshotter" + var KeySpec = "spec" + var KeyTarget = "target" + var KeyUpdatedAt = "updatedat" + var KeyUpperdir = "upperdir" + var KeyVersion = schemaVersion + var LeaseBackend string + func NewBoltLeaseManager(db *DB) leases.Manager + func NewContainerStore(db *DB) containers.Store + func NewImageStore(db *DB) images.Store + func NewLeaseManager(db *DB) leases.Manager + func NewNamespaceStore(db *DB) namespaces.Store + func NewSandboxStore(db *DB) api.Store + func WithPolicyIsolated(o *dbOptions) + func WithTransactionContext(ctx context.Context, tx *bolt.Tx) context.Context + type CollectionContext interface + Active func(namespace string, fn func(gc.Node)) + All func(func(gc.Node)) + Cancel func() error + Finish func() error + Leased func(namespace, lease string, fn func(gc.Node)) + Remove func(gc.Node) + type Collector interface + ReferenceLabel func() string + StartCollection func(context.Context) (CollectionContext, error) + type DB struct + func NewDB(c clientv3.Config, bdb *bolt.DB, cs content.Store, ...) (*DB, error) + func (m *DB) Close() error + func (m *DB) ContentStore() content.Store + func (m *DB) EUpdate(tx func(transactor) error) error + func (m *DB) GarbageCollect(ctx context.Context) (gc.Stats, error) + func (m *DB) Get(key string, opts ...clientv3.OpOption) (map[string]string, error) + func (m *DB) Init() error + func (m *DB) Lock(pfx string) (func() error, error) + func (m *DB) Put(key, value string, opts ...clientv3.OpOption) error + func (m *DB) RLock(pfx string) (func() error, error) + func (m *DB) RegisterCollectibleResource(t gc.ResourceType, c Collector) + func (m *DB) RegisterMutationCallback(fn func(bool)) + func (m *DB) Snapshotter(name string) snapshots.Snapshotter + func (m *DB) Snapshotters() map[string]snapshots.Snapshotter + func (m *DB) TryLock(pfx string) (func() error, error) + func (m *DB) Update(fn func(*bolt.Tx) error) error + func (m *DB) View(fn func(*bolt.Tx) error) error + func (m *DB) WithTransactionContext(ctx context.Context, tx *bolt.Tx) context.Context + type DBOpt func(*dbOptions) + type GCStats struct + ContentD time.Duration + MetaD time.Duration + SnapshotD map[string]time.Duration + func (s GCStats) Elapsed() time.Duration + type Transactor struct + func NewTransactor(db *DB) *Transactor + func (t *Transactor) Get(key string, opts ...clientv3.OpOption) (map[string]string, error) + func (t *Transactor) Lock(pfx string) (func() error, error) + func (t *Transactor) Put(key, value string, opts ...clientv3.OpOption) error + func (t *Transactor) RLock(pfx string) (func() error, error) + func (t *Transactor) TryLock(pfx string) (func() error, error)