sessiontest

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sessiontest provides executable continuation-store conformance checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckContinuation

func CheckContinuation(ctx context.Context, store session.ContinuationStore, id string, crashHook ...ContinuationCrashHook) error

CheckContinuation checks ID-first idempotency, body comparison, and head CAS. The caller provides a newly created, empty session. An optional crash hook also checks rollback and retry publication. Errors identify the broken rule.

func CheckContinuationRounds

func CheckContinuationRounds(ctx context.Context, store session.ContinuationStore, sessionID string) error

CheckContinuationRounds races publishers from the same head through four successive positions. Every round must commit exactly one body and head.

Types

type ContinuationCrashHook

type ContinuationCrashHook func(context.Context, session.Continuation) error

ContinuationCrashHook attempts to publish the supplied body with a store-specific fault between the body insert and head update, returning the injected error. The hook must disarm the fault before returning so a normal retry can succeed. Stores with an indivisible in-memory update can use a cancelled-context attempt.

Jump to

Keyboard shortcuts

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