Documentation
¶
Overview ¶
Package attemptstore persists bounded learning attempts in a crash-safe, owner-partitioned document.
Index ¶
- type Store
- func (s *Store) Abandon(ctx context.Context, partition learning.AttemptPartition, ...) (learning.AttemptRecord, error)
- func (s *Store) AcquireClaim(ctx context.Context, partition learning.AttemptPartition, ...) (out learning.AttemptRecord, claim learning.AttemptClaim, err error)
- func (s *Store) Checkpoint(ctx context.Context, partition learning.AttemptPartition, ...) (learning.AttemptRecord, error)
- func (s *Store) Create(ctx context.Context, partition learning.AttemptPartition, ...) (out learning.AttemptRecord, err error)
- func (s *Store) Delete(ctx context.Context, partition learning.AttemptPartition, ...) (err error)
- func (s *Store) DeleteTerminalOlderThan(ctx context.Context, partition learning.AttemptPartition, ...) (deleted int, err error)
- func (s *Store) DiscoverWork(ctx context.Context, query learning.AttemptWorkList) (page learning.AttemptWorkPage, err error)
- func (s *Store) Finalize(ctx context.Context, partition learning.AttemptPartition, ...) (learning.AttemptRecord, error)
- func (s *Store) Get(ctx context.Context, partition learning.AttemptPartition, ...) (out learning.AttemptRecord, found bool, err error)
- func (s *Store) List(ctx context.Context, partition learning.AttemptPartition, ...) (page learning.AttemptPage, err error)
- func (s *Store) ReleaseClaim(ctx context.Context, partition learning.AttemptPartition, ...) (learning.AttemptRecord, error)
- func (s *Store) RenewClaim(ctx context.Context, partition learning.AttemptPartition, ...) (learning.AttemptRecord, learning.AttemptClaim, error)
- func (s *Store) Retry(ctx context.Context, partition learning.AttemptPartition, ...) (learning.AttemptRecord, error)
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 (*Store) Abandon ¶
func (s *Store) Abandon(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID, expected learning.AttemptVersion) (learning.AttemptRecord, error)
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) Checkpoint ¶
func (s *Store) Checkpoint(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID, expected learning.AttemptVersion, claim learning.AttemptClaim, checkpoint learning.AttemptCheckpoint) (learning.AttemptRecord, 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 (*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) Finalize ¶
func (s *Store) Finalize(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID, expected learning.AttemptVersion, claim learning.AttemptClaim, final learning.AttemptFinalization) (learning.AttemptRecord, error)
func (*Store) List ¶
func (s *Store) List(ctx context.Context, partition learning.AttemptPartition, query learning.AttemptList) (page learning.AttemptPage, err error)
func (*Store) ReleaseClaim ¶
func (s *Store) ReleaseClaim(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID, expected learning.AttemptVersion, claim learning.AttemptClaim) (learning.AttemptRecord, error)
func (*Store) RenewClaim ¶
func (s *Store) RenewClaim(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID, expected learning.AttemptVersion, claim learning.AttemptClaim, duration time.Duration) (learning.AttemptRecord, learning.AttemptClaim, error)
func (*Store) Retry ¶
func (s *Store) Retry(ctx context.Context, partition learning.AttemptPartition, id learning.AttemptID, expected learning.AttemptVersion) (learning.AttemptRecord, error)
Click to show internal directories.
Click to hide internal directories.