mirror of
https://github.com/kopia/kopia.git
synced 2026-01-28 00:08:04 -05:00
* epoch: misc fixes and logging * blob: misc helpers * cli: removed useless 'repository upgrade', replaced by 'repository set-parameters' * content: implemented indexBlobManagerV1 which uses epoch manager * cli: commands to manipulate repository epoch parameters * cli: commands to examine epoch-based indexes * content: added test suite that uses epoch-based index manager * content: fixed a ton of test data races caused by sharing blobtesting.DataMap * cli: additional tests and validation for 'repository set-params' * testing: replaced the use of suite with our own, since suite is not parallelizable
20 lines
629 B
Go
20 lines
629 B
Go
package content
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kopia/kopia/internal/epoch"
|
|
)
|
|
|
|
// Reader defines content read API.
|
|
type Reader interface {
|
|
SupportsContentCompression() bool
|
|
ContentFormat() FormattingOptions
|
|
GetContent(ctx context.Context, id ID) ([]byte, error)
|
|
ContentInfo(ctx context.Context, id ID) (Info, error)
|
|
IterateContents(ctx context.Context, opts IterateOptions, callback IterateCallback) error
|
|
IteratePacks(ctx context.Context, opts IteratePackOptions, callback IteratePacksCallback) error
|
|
ListActiveSessions(ctx context.Context) (map[SessionID]*SessionInfo, error)
|
|
EpochManager() (*epoch.Manager, bool)
|
|
}
|