Documentation
¶
Index ¶
Constants ¶
View Source
const CName = "node.archive"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive interface {
app.ComponentRunnable
Restore(ctx context.Context, spaceId string) (err error)
// ForceArchive uploads a snapshot of the space to the archive store while
// keeping the local DB and its status intact. Used to ship live spaces
// through the shared archive store during migration. The caller must ensure
// the space is not already archived: opening an archived space triggers a
// restore. Returns the heads read from the snapshot itself (they exactly
// describe the uploaded object, unlike the asynchronously updated index)
// and the snapshot sizes.
// The return types are primitives on purpose: a struct would make the
// generated mock import this package and create test-only import cycles.
ForceArchive(ctx context.Context, spaceId string) (oldHash, newHash string, compressedSize, uncompressedSize int64, err error)
// QueueRestore schedules a background restore of an archived space
// (used for eager adoption of migrated spaces).
QueueRestore(spaceId string)
}
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled"`
ArchiveAfterDays int `yaml:"archiveAfterDays"`
CheckPeriodMinutes int `yaml:"checkPeriodMinutes"`
// SweepPeriodHours is the period of the archive-prefix garbage collector
// (removes stale objects that no longer back an archived space), default 24.
SweepPeriodHours int `yaml:"sweepPeriodHours"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
mock_adopter
Package mock_adopter is a generated GoMock package.
|
Package mock_adopter is a generated GoMock package. |
|
mock_archivestore
Package mock_archivestore is a generated GoMock package.
|
Package mock_archivestore is a generated GoMock package. |
|
Package mock_archive is a generated GoMock package.
|
Package mock_archive is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.