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

localdisk

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package localdisk is the stack's single-machine storage profile: fsstore roots under one data directory.

<dir>/control            Factory and Host's SessionStore
<dir>/journal/<tenant>   one harness journal backend per tenant
<dir>/workspaces         session workspaces

SINGLE PROCESS ONLY. fsstore is a local filesystem store, so the returned Storage is marked SingleProcess and stack refuses it with RemoteHosts.

Every root's Blobs is adapted with storage.WithBoundedBlobReaders, the explicit single-host opt-in SessionStore needs from a filesystem store: a stuck read is abandoned at Close, not cancelled.

A data directory written before fsstore v0.6.0 is refused with *LegacyDataDirError, which wraps fsstore.ErrLegacyLayout. There is no migration and retrying cannot help: move or delete the directory. Never point an older binary at a directory this one wrote; it would silently misread it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dir string) (stack.Storage, error)

Open opens (creating if absent) the control root under dir and returns the profile. Tenant journal roots open on first use. Close closes every root it opened.

Types

type LegacyDataDirError

type LegacyDataDirError struct {
	Dir  string // the data directory to move or delete
	Root string // the fsstore root that was refused
	Err  error  // fsstore's *LegacyLayoutError
}

LegacyDataDirError is a data directory holding pre-v0.6.0 fsstore data. Remedy: move or delete Dir. It is permanent; never retry.

func (*LegacyDataDirError) Error

func (e *LegacyDataDirError) Error() string

func (*LegacyDataDirError) Unwrap

func (e *LegacyDataDirError) Unwrap() error

Unwrap returns fsstore's refusal, so errors.Is(err, fsstore.ErrLegacyLayout) holds.

type UnsupportedTenantError

type UnsupportedTenantError struct{ Tenant sessionwire.TenantID }

UnsupportedTenantError is a tenant id localdisk cannot use as a directory name. Tenants must match [a-z0-9][a-z0-9_.-]{0,63}.

func (*UnsupportedTenantError) Error

func (e *UnsupportedTenantError) Error() string

Jump to

Keyboard shortcuts

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