Documentation
¶
Overview ¶
Package persistence owns deployment settings, state blobs and SQL leases.
Index ¶
- Variables
- func Authority(root string, exclusive bool) (func(), error)
- func Configure(ctx context.Context, root string, options Options, expectedHash string) error
- func ConfigureVersion(ctx context.Context, root string, options Options, expectedHash string, ...) error
- func Document(ctx context.Context, root string) (string, uint64, []byte, error)
- func Hash(raw []byte) string
- func MergeDeploy(file, settings []byte) ([]byte, error)
- func MetadataName(path string) bool
- type Blob
- type DB
- func (d *DB) Acquire(ctx context.Context, scope string) (*Lease, error)
- func (d *DB) Active(ctx context.Context) error
- func (d *DB) Blobs(ctx context.Context) ([]Blob, error)
- func (d *DB) Close() error
- func (d *DB) Read(ctx context.Context, scope, name string) ([]byte, error)
- func (d *DB) SaveSettings(ctx context.Context, expected uint64, raw []byte) error
- func (d *DB) Settings(ctx context.Context) (uint64, []byte, error)
- type Lease
- func (l *Lease) Append(ctx context.Context, name string, raw []byte) error
- func (l *Lease) Context(parent context.Context) context.Context
- func (l *Lease) GuardedBy(gate *Lease) error
- func (l *Lease) Release() error
- func (l *Lease) Renew(ctx context.Context) error
- func (l *Lease) SaveSettings(ctx context.Context, expected uint64, raw []byte) error
- func (l *Lease) Write(ctx context.Context, name string, raw []byte) error
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRetired = errors.New("deployment store was retired by an explicit authority switch; select the current store") ErrConflict = errors.New("deployment settings changed; reload before saving") ErrLocked = errors.New("another deployment holds the lock") ErrLeaseLost = errors.New("deployment lease lost; stop and inspect state") )
Functions ¶
func ConfigureVersion ¶
func MergeDeploy ¶
MergeDeploy keeps runtime project and build settings owned by the checkout.
func MetadataName ¶
Types ¶
type Lease ¶
func (*Lease) SaveSettings ¶
Click to show internal directories.
Click to hide internal directories.