inmem

package
v0.56.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinator

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

Coordinator coordinates ObjectStore access within one process.

func ForVolume

func ForVolume(volumeID string) *Coordinator

ForVolume returns the process-local coordinator for a Volume id.

func NewCoordinator

func NewCoordinator() *Coordinator

NewCoordinator builds an in-memory coordinator.

func (*Coordinator) Capability

func (c *Coordinator) Capability(ctx context.Context, scope coord.Scope) (*coord.Capability, error)

Capability reports in-memory coordination support.

func (*Coordinator) Snapshot

func (c *Coordinator) Snapshot(ctx context.Context, scope coord.Scope) (*coord.Snapshot, error)

Snapshot returns the latest in-memory generation and root.

func (*Coordinator) TryAcquireWriteLease

func (c *Coordinator) TryAcquireWriteLease(ctx context.Context, scope coord.Scope) (coord.WriteLease, bool, error)

TryAcquireWriteLease attempts to acquire the logical write lease.

func (*Coordinator) WaitAcquireWriteLease

func (c *Coordinator) WaitAcquireWriteLease(ctx context.Context, scope coord.Scope) (coord.WriteLease, error)

WaitAcquireWriteLease waits until the logical write lease is available.

func (*Coordinator) Watch

func (c *Coordinator) Watch(ctx context.Context, scope coord.Scope, afterGeneration uint64) (coord.Watch, error)

Watch returns coordination events after afterGeneration.

Jump to

Keyboard shortcuts

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