memattempt

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Overview

Package memattempt provides the concurrency-safe in-memory reference implementation of learning.AttemptRepository.

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 an in-memory AttemptRepository. All lifecycle mutations are serialized so version and claim checks are atomic.

func New

func New(clock port.Clock) *Store

New constructs an isolated repository using clock for creation timestamps.

func (*Store) Abandon

func (*Store) Create

func (*Store) Delete

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

func (*Store) DeleteTerminalOlderThan

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

func (*Store) DiscoverWork

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

func (*Store) Get

func (*Store) List

func (*Store) Retry

Jump to

Keyboard shortcuts

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