Help us shape the future of Go! Take the 2026 Go Developer Survey

fstest

package
v0.0.0-...-429f5ee Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fstest provides in-memory test doubles for exercising the filesystem service without a Raft cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMemoryService

func NewMemoryService(opts ...filesystem.Option) (*filesystem.Service, error)

NewMemoryService builds a filesystem.Service over a fresh in-memory MVCC store and a MemoryDispatcher.

Types

type MemoryDispatcher

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

MemoryDispatcher applies operation groups directly to an MVCC store. It satisfies filesystem.Dispatcher and the optional linearizable-read fence so tests can drive filesystem.Service end to end without replication.

func NewMemoryDispatcher

func NewMemoryDispatcher(st store.MVCCStore) *MemoryDispatcher

NewMemoryDispatcher wraps st in a dispatcher that commits every group at the next commit timestamp.

func (*MemoryDispatcher) Dispatch

Dispatch applies the group's mutations atomically at a fresh commit timestamp, validating OCC read keys against the group's start timestamp.

func (*MemoryDispatcher) LinearizableRead

func (d *MemoryDispatcher) LinearizableRead(context.Context) (uint64, error)

LinearizableRead returns the latest applied commit timestamp.

Jump to

Keyboard shortcuts

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