Versions in this module Expand all Collapse all v0 v0.20.0 Nov 12, 2026 v0.19.0 Oct 30, 2026 v0.18.0 Oct 13, 2026 v0.17.0 Oct 12, 2026 v0.16.0 Oct 12, 2026 Changes in this version + const DateTolerance + const DefaultLeaseTTL + const LeaseKey + const ManifestVersion + const OpsRingSize + const ProbeIgnored + const ProbeInconclusive + const ProbeKey + const ProbeMishandled + const ProbeRejected + const RepoPrefix + var ErrCASContention = errors.New("s3wal: conditional-write contention retries exhausted") + var ErrExists = errors.New("s3wal: object already exists") + var ErrLostRace = errors.New("s3wal: conditional write lost the race") + var ErrNotExecuted = errors.New("s3wal: request not executed") + var ErrNotExist = errors.New("s3wal: object does not exist") + var ErrNotModified = errors.New("s3wal: object not modified") + func BaseFromManifestKey(key string) (string, bool) + func ClkNext(localNow, prev time.Time) time.Time + func DateOK(localNow, date time.Time, ttl time.Duration) bool + func DateSkewBound(ttl time.Duration) time.Duration + func DecodeSeq(body []byte) (int64, bool) + func DriftOK(wallDrift, ttl time.Duration) bool + func Elapsed(localNow, clk, stamp time.Time) time.Duration + func ManifestKey(base string) string + func NewOpID() string + func Probe(ctx context.Context, c *Client) error + func SkewOK(localNow, clk time.Time, wallDrift, ttl time.Duration) bool + func ValidBaseRepoKey(base string) bool + type AmbiguousError struct + Cause error + Key string + Op string + func (e *AmbiguousError) Error() string + func (e *AmbiguousError) Unwrap() error + type Client struct + DecodeSeq func(body []byte) (seq int64, ok bool) + func Dial(ctx context.Context, rawURL string) (*Client, error) + func New(s3c *s3.Client, bucket string) *Client + func (c *Client) Advance(ctx context.Context, key string, body []byte, etag string) (string, error) + func (c *Client) Close() + func (c *Client) Create(ctx context.Context, key string, body []byte) (string, error) + func (c *Client) Delete(ctx context.Context, key string) error + func (c *Client) Get(ctx context.Context, key string) (Object, error) + func (c *Client) GetIfChanged(ctx context.Context, key, etag string) (Object, error) + func (c *Client) List(ctx context.Context, prefix, startAfter string, limit int) ([]string, error) + func (c *Client) StoreDate() (date, observedAt time.Time, ok bool) + type ConditionalStore interface + Advance func(ctx context.Context, key string, body []byte, etag string) (string, error) + Create func(ctx context.Context, key string, body []byte) (string, error) + Delete func(ctx context.Context, key string) error + Get func(ctx context.Context, key string) (Object, error) + GetIfChanged func(ctx context.Context, key, etag string) (Object, error) + List func(ctx context.Context, prefix, startAfter string, limit int) ([]string, error) + StoreDate func() (date, observedAt time.Time, ok bool) + type DeleteLock struct + CreatedAt time.Time + OpID string + Owner string + type InstanceLease struct + func AcquireInstanceLease(ctx context.Context, cs ConditionalStore, cfg LeaseConfig) (*InstanceLease, error) + func (l *InstanceLease) Heartbeat(ctx context.Context) error + func (l *InstanceLease) Holder() string + func (l *InstanceLease) Release(ctx context.Context) + type LFSObject struct + Bytes int64 + CreatedAt time.Time + UnreferencedSince *time.Time + type LFSState struct + AdoptionGen int64 + Count int64 + Mismatches map[string]string + Objects map[string]*LFSObject + type LeaseConfig struct + Cadence time.Duration + Now func() time.Time + TTL time.Duration + type LeaseHeldError struct + Age time.Duration + Holder string + TTL time.Duration + func (e *LeaseHeldError) Error() string + type Manifest struct + Clk time.Time + DeleteLocks map[string]*DeleteLock + LFS LFSState + Members map[string]*Member + Ops []string + PurgedAt *time.Time + Reservations map[string]*Reservation + Seq int64 + SyncClaim *SyncClaim + UsageBytes int64 + V int + Writer string + func DecodeManifest(body []byte) (*Manifest, error) + func NewManifest() *Manifest + func (m *Manifest) EncodeAdvance(clk time.Time) ([]byte, error) + func (m *Manifest) EnsureMember(repo string) *Member + func (m *Manifest) Member(repo string) *Member + func (m *Manifest) OpApplied(opID string) bool + func (m *Manifest) RecordOp(opID string) + type MemCAS struct + Hooks MemCASHooks + Now func() time.Time + func NewMemCAS() *MemCAS + func (m *MemCAS) Advance(_ context.Context, key string, body []byte, etag string) (string, error) + func (m *MemCAS) Create(_ context.Context, key string, body []byte) (string, error) + func (m *MemCAS) Delete(_ context.Context, key string) error + func (m *MemCAS) Get(_ context.Context, key string) (Object, error) + func (m *MemCAS) GetIfChanged(ctx context.Context, key, etag string) (Object, error) + func (m *MemCAS) List(_ context.Context, prefix, startAfter string, limit int) ([]string, error) + func (m *MemCAS) StoreDate() (date, observedAt time.Time, ok bool) + type MemCASHooks struct + AfterPut func(op, key string) + PutFault func(op, key string) PutFault + StaleGet func(key string) bool + type Member struct + Gen int64 + Packs []PackRecord + Refs map[string]RefRecord + Retained map[string]RetainedPack + type Object struct + Body []byte + ETag string + LastModified time.Time + type PackRecord struct + Bytes int64 + CreatedAt time.Time + ID string + Key string + type ProbeError struct + Class string + Diagnosis string + Step int + Surface string + func (e *ProbeError) Error() string + type PutFault int + const FaultAmbiguousApplied + const FaultAmbiguousDropped + const FaultContention + const FaultNone + const FaultNotExecuted + type RefRecord struct + CreatedAt time.Time + SHA string + type Reservation struct + Attempts int64 + Bytes int64 + CreatedAt time.Time + Gen string + OpID string + Owner string + type RetainedPack struct + Bytes int64 + SupersededAt time.Time + type SyncClaim struct + CreatedAt time.Time + Holder string