Documentation
¶
Overview ¶
Package conformance holds the runner-independent Storage and SessionRepo conformance suites every session backend must pass.
Index ¶
- func CreateSessionRepoConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoForkBehaviorConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoForkConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoForkCoordinationConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoForkDestinationReservationConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoForkSourceSnapshotConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoLifecycleConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoMessageConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoOwnershipConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateSessionRepoStreamingForkConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
- func CreateStorageConformance(factory func() (sessiontesting.StorageFixture, error)) []sessiontesting.ConformanceCase
- type RepoAdapter
- type RepoFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSessionRepoConformance ¶
func CreateSessionRepoConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoConformance creates every SessionRepo conformance case.
func CreateSessionRepoForkBehaviorConformance ¶
func CreateSessionRepoForkBehaviorConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoForkBehaviorConformance creates fork-content cases that do not require concurrent repository coordination.
func CreateSessionRepoForkConformance ¶
func CreateSessionRepoForkConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoForkConformance creates every fork conformance case.
func CreateSessionRepoForkCoordinationConformance ¶
func CreateSessionRepoForkCoordinationConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoForkCoordinationConformance creates every fork coordination case.
func CreateSessionRepoForkDestinationReservationConformance ¶
func CreateSessionRepoForkDestinationReservationConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoForkDestinationReservationConformance creates fork cases that require destination reservation across create and fork. Go has no synchronous admission prefix for concurrent blocking calls, so each case races create and fork for one destination id and requires exactly one to publish it.
func CreateSessionRepoForkSourceSnapshotConformance ¶
func CreateSessionRepoForkSourceSnapshotConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoForkSourceSnapshotConformance creates fork cases that require a snapshot boundary on an active source storage queue.
func CreateSessionRepoLifecycleConformance ¶
func CreateSessionRepoLifecycleConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoLifecycleConformance creates lifecycle cases for repositories that support creation, discovery, open, and deletion.
func CreateSessionRepoMessageConformance ¶
func CreateSessionRepoMessageConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoMessageConformance creates message cases for repositories that support session creation.
func CreateSessionRepoOwnershipConformance ¶
func CreateSessionRepoOwnershipConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoOwnershipConformance creates exclusive-open cases for repositories that own active session handles.
func CreateSessionRepoStreamingForkConformance ¶
func CreateSessionRepoStreamingForkConformance(factory RepoFactory, onClose func() error) []sessiontesting.ConformanceCase
CreateSessionRepoStreamingForkConformance creates the application-list, branch application-state, and lane-validation fork cases.
func CreateStorageConformance ¶
func CreateStorageConformance(factory func() (sessiontesting.StorageFixture, error)) []sessiontesting.ConformanceCase
CreateStorageConformance creates fresh, runner-independent cases for the durable Storage contract.
Types ¶
type RepoAdapter ¶
type RepoAdapter struct {
Create func(ctx context.Context, options session.SessionCreateOptions) (session.Session, error)
Open func(ctx context.Context, metadata session.SessionMetadata) (session.Session, error)
List func(ctx context.Context) ([]session.SessionMetadata, error)
Delete func(ctx context.Context, metadata session.SessionMetadata) error
Fork func(ctx context.Context, source session.SessionMetadata, options session.ForkOptions) (session.Session, error)
}
RepoAdapter binds one backend repository to the methods the session-repo groups exercise, so partial backends can run only the groups they support and backend-specific create/list options stay in the adapter.
type RepoFactory ¶
type RepoFactory func() (RepoAdapter, error)
RepoFactory creates a fresh adapter for one case.