space

package
v0.1.73 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package space holds a PC's local Space: a World on a database in the daemon's directory. Modlock keeps game files there as UnixFS objects, which store each file as content-addressed blocks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	// Handle is the object's root directory.
	Handle *unixfs.FSHandle
	// Key is the object's key in the World.
	Key string
	// Type is the object's UnixFS kind.
	Type unixfs_world.FSType
	// World is the World the object lives in.
	World world.WorldState
	// contains filtered or unexported fields
}

FS is an open UnixFS object in the Space.

func (*FS) Release

func (f *FS) Release()

Release closes the object.

type Space

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

Space is an open local Space. Release it after every handle it opened.

func Open

func Open(ctx context.Context, le *logrus.Entry, path string) (_ *Space, rerr error)

Open opens the Space in the database at path, creating it when absent. Only one process may open path at a time; the daemon's lock ensures it.

func (*Space) OpenFS

func (s *Space) OpenFS(ctx context.Context, key string) (*FS, error)

OpenFS opens the UnixFS object at key, creating an empty one when absent.

func (*Space) Release

func (s *Space) Release()

Release stops the World and closes the database.

Jump to

Keyboard shortcuts

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