mirror of
https://github.com/kopia/kopia.git
synced 2026-03-27 10:32:08 -04:00
* fixed new gocritic violations * fixed new 'contextcheck' violations * fixed 'gosec' warnings * suppressed ireturn and varnamelen linters * fixed tenv violations, enabled building robustness tests on arm64 * fixed remaining linux failures * makefile: fixed 'lint-all' target when running on arm64 * linter: increase deadline * disable nilnil linter - to be enabled in separate PR
24 lines
598 B
Go
24 lines
598 B
Go
//go:build darwin || (linux && amd64)
|
|
// +build darwin linux,amd64
|
|
|
|
package robustness
|
|
|
|
import "context"
|
|
|
|
// Store describes the ability to store and retrieve
|
|
// a buffer of metadata, indexed by a string key.
|
|
type Store interface {
|
|
Store(ctx context.Context, key string, val []byte) error
|
|
Load(ctx context.Context, key string) ([]byte, error)
|
|
Delete(ctx context.Context, key string) error
|
|
}
|
|
|
|
// Persister describes the ability to flush metadata
|
|
// to, and load it again, from a repository.
|
|
type Persister interface {
|
|
Store
|
|
LoadMetadata() error
|
|
FlushMetadata() error
|
|
GetPersistDir() string
|
|
}
|