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

sync

package
v0.57.17 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package sync hosts a standalone World engine over caller-selected storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachEngine

func AttachEngine(le *logrus.Entry, b bus.Bus, engine world.Engine) (srpc.Invoker, func(), error)

AttachEngine mounts a granted engine as a Resource service for a private host. Its caller owns the RPC context; cancel and join that context before release. Releasing the mount leaves the caller's engine usable.

Types

type Engine

type Engine struct {
	// Bus owns all controllers, including their joined shutdown.
	Bus bus.Bus
	// World is the ready engine capability.
	World world.Engine
	// State provides convenience operations over World transactions.
	State world.WorldState
	// contains filtered or unexported fields
}

Engine owns one ready World and the bus that runs its storage controllers. Callers stop admitting operations before Close and must not use it afterwards.

func Open

func Open(ctx context.Context, le *logrus.Entry, backing storage.Storage) (_ *Engine, resultErr error)

Open constructs a ready World without starting accounts, networking, or apps. Storage owns its dataset; closing the engine releases handles and never deletes it.

func (*Engine) Close

func (e *Engine) Close() error

Close fences acknowledged data and joins all owned controllers. Failure still releases every handle and remains observable on subsequent calls.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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