Documentation
¶
Index ¶
Constants ¶
View Source
const CName = "node.archive.store"
Variables ¶
View Source
var ( ErrNotFound = errors.New("archive store: not found") ErrDisabled = errors.New("archive store is disabled") )
Functions ¶
This section is empty.
Types ¶
type ArchiveStore ¶
type ArchiveStore interface {
app.Component
Get(ctx context.Context, name string) (data io.ReadCloser, err error)
Put(ctx context.Context, name string, data io.ReadSeeker) (err error)
Delete(ctx context.Context, name string) (err error)
// Exists checks the object presence in this node's prefix without fetching it.
Exists(ctx context.Context, name string) (ok bool, err error)
// Key returns the full bucket key for the given name in this node's prefix.
Key(name string) string
// CopyFrom server-side copies an object from an absolute bucket key
// (typically another node's prefix in the shared bucket) into this node's prefix.
CopyFrom(ctx context.Context, srcKey, name string) (err error)
// enabling S3-mediated space migration.
Shared() bool
// List iterates all objects in this node's prefix; iter receives the object
// name (key without the prefix) and its last-modified time, returning false
// to stop the iteration.
List(ctx context.Context, iter func(name string, lastModified time.Time) (bool, error)) (err error)
}
func New ¶
func New() ArchiveStore
type Config ¶
type Config struct {
Enabled bool `yaml:"enabled"`
Profile string `yaml:"profile"`
Region string `yaml:"region"`
Bucket string `yaml:"bucket"`
Endpoint string `yaml:"endpoint"`
Credentials Credentials `yaml:"credentials"`
ForcePathStyle bool `yaml:"forcePathStyle"`
KeyPrefix string `yaml:"keyPrefix"`
// (each node under its own KeyPrefix). Enables S3-mediated space migration
// (resharding): snapshots are handed between nodes via server-side copy.
Shared bool `yaml:"shared"`
}
type Credentials ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mock_archivestore is a generated GoMock package.
|
Package mock_archivestore is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.