attemptstore

package
v0.0.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package attemptstore persists bounded learning attempts in a crash-safe, owner-partitioned document.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a flocked, crash-safe learning.AttemptRepository. New is lazy: an empty repository does not create its directory until the first mutation.

func New

func New(dir string) (*Store, error)

New prepares a repository rooted at dir without creating it.

func (*Store) Abandon

func (*Store) AcquireClaim

func (s *Store) AcquireClaim(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID, expected learning.AttemptVersion, duration time.Duration) (out learning.AttemptRecord, claim learning.AttemptClaim, err error)

func (*Store) Create

func (s *Store) Create(ctx context.Context, partition learning.AttemptPartition, create learning.AttemptCreate) (out learning.AttemptRecord, err error)

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID, expected learning.AttemptVersion) (err error)

func (*Store) DeleteTerminalOlderThan

func (s *Store) DeleteTerminalOlderThan(ctx context.Context, partition learning.AttemptPartition, olderThan time.Duration, limit int) (deleted int, err error)

func (*Store) DiscoverWork

func (s *Store) DiscoverWork(ctx context.Context, query learning.AttemptWorkList) (page learning.AttemptWorkPage, err error)

DiscoverWork returns bounded repository-authoritative work across partitions.

func (*Store) Get

func (s *Store) Get(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID) (out learning.AttemptRecord, found bool, err error)

func (*Store) List

func (s *Store) List(ctx context.Context, partition learning.AttemptPartition, query learning.AttemptList) (page learning.AttemptPage, err error)

func (*Store) Retry

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL