memory

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStaleFencingToken = errors.New("fencing/memory: stale fencing token")

ErrStaleFencingToken is returned when a resource mutation carries a stale token.

Functions

This section is empty.

Types

type Resource

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

Resource is an in-process fenced resource for tests and examples.

func NewResource

func NewResource() *Resource

NewResource creates an empty fenced resource.

func (*Resource) Read

func (r *Resource) Read() (string, shiftlock.FencingToken)

Read returns the current value and fencing token.

func (*Resource) Write

func (r *Resource) Write(token shiftlock.FencingToken, value string) error

Write mutates the resource only if token is accepted by the fencing epoch.

Jump to

Keyboard shortcuts

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