Documentation
¶
Overview ¶
Package persistence publishes immutable checkpoints outside the hot path.
Index ¶
- Constants
- func PermanentError(err error) bool
- type Archive
- func (a *Archive) Delete(ctx context.Context, tenant, id string) error
- func (a *Archive) List(ctx context.Context, tenant, after string, limit int) ([]core.Session, error)
- func (a *Archive) Publish(ctx context.Context, s Snapshot) (Manifest, error)
- func (a *Archive) Restore(ctx context.Context, tenant, id, reference, parent string) (Manifest, string, error)
- type Artifact
- type FileObjects
- type GCSObjects
- type Manifest
- type Metadata
- type Objects
- type Postgres
- func (p *Postgres) Close() error
- func (p *Postgres) Delete(ctx context.Context, tenant, id string) error
- func (p *Postgres) Get(ctx context.Context, tenant, id string) (core.Session, string, error)
- func (p *Postgres) List(ctx context.Context, tenant, after string, limit int) ([]core.Session, error)
- func (p *Postgres) Put(ctx context.Context, s core.Session, reference string) error
- type S3Objects
- type Settings
- type Snapshot
Constants ¶
View Source
const BlockBytes int64 = 64 << 10
Complete blocks are uploaded once. Only the bounded partial block repeats.
View Source
const MaxObjectBytes = 2 << 20
Variables ¶
This section is empty.
Functions ¶
func PermanentError ¶
PermanentError stops background retries until the operator fixes credentials or the bucket and explicitly requests synchronization again.
Types ¶
type Archive ¶
func (*Archive) List ¶
func (a *Archive) List(ctx context.Context, tenant, after string, limit int) ([]core.Session, error)
List returns the optional eventual discovery index. An archive without an index contributes no remote rows; local discovery remains authoritative.
type FileObjects ¶
type FileObjects struct{ Root string }
func (FileObjects) DeletePrefix ¶
func (s FileObjects) DeletePrefix(ctx context.Context, prefix string) error
type GCSObjects ¶
type GCSObjects struct {
// contains filtered or unexported fields
}
func (*GCSObjects) Close ¶
func (s *GCSObjects) Close() error
func (*GCSObjects) DeletePrefix ¶
func (s *GCSObjects) DeletePrefix(ctx context.Context, prefix string) error
type Manifest ¶
type Metadata ¶
type Metadata interface {
Delete(context.Context, string, string) error
Put(context.Context, core.Session, string) error
Get(context.Context, string, string) (core.Session, string, error)
List(context.Context, string, string, int) ([]core.Session, error)
Close() error
}
Metadata is an eventual discovery index, never a session ownership lock.
type Objects ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
type S3Objects ¶
type S3Objects struct {
// contains filtered or unexported fields
}
func (*S3Objects) DeletePrefix ¶
type Settings ¶
type Settings struct {
Provider string `json:"provider"`
Directory string `json:"directory,omitempty"`
Bucket string `json:"bucket,omitempty"`
Region string `json:"region,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
Prefix string `json:"prefix,omitempty"`
AccessKeyEnv string `json:"access_key_env,omitempty"`
SecretKeyEnv string `json:"secret_key_env,omitempty"`
PostgresEnv string `json:"postgres_env,omitempty"`
IntervalSeconds int `json:"interval_seconds,omitempty"`
Queue int `json:"queue,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.