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

francis

package
v2.17.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Overview

Package francis owns the embedded Francis host lifecycle.

Index

Constants

View Source
const TablePrefix = "arcane_francis"

TablePrefix namespaces the Francis tables in their store.

Variables

This section is empty.

Functions

func ClearRestoredHosts

func ClearRestoredHosts(ctx context.Context, databaseURL string) (err error)

ClearRestoredHosts removes copied live host ownership from an offline restored database. Never call this against a running Arcane database.

func MigrateLegacyStore added in v2.15.1

func MigrateLegacyStore(ctx context.Context, mainDB *sql.DB, databaseURL string) (err error)

MigrateLegacyStore moves Francis state kept inside the Arcane SQLite database into its dedicated file, then drops the old tables. Reruns until the drop succeeds.

func StorePath added in v2.15.1

func StorePath(databasePath string) string

StorePath names the dedicated Francis SQLite file beside the Arcane database.

func StoreURL added in v2.15.1

func StoreURL(databaseURL string) (string, error)

StoreURL resolves Francis storage: a sibling SQLite file with the Arcane SQLite settings except foreign_keys, which Francis enforces, or the Postgres URL unchanged.

Types

type Runtime

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

Runtime starts one durable actor host and publishes its service after readiness. Services must wait for Ready before using Service, including during startup retries.

func New

func New(databaseURL, encryptionKey, instanceID, port string, options ...local.HostOption) (*Runtime, error)

func (*Runtime) ActorName

func (r *Runtime) ActorName(actorID string) string

ActorName returns the display name set by NameActor, or an empty string.

func (*Runtime) ConfigureIdentity

func (r *Runtime) ConfigureIdentity(encryptionKey, instanceID string) error

ConfigureIdentity binds the final persisted identity before Start.

func (*Runtime) Done added in v2.16.1

func (r *Runtime) Done() <-chan struct{}

func (*Runtime) NameActor

func (r *Runtime) NameActor(actorID, name string)

NameActor changes only the log display; durable actor IDs remain unchanged.

func (*Runtime) Ready

func (r *Runtime) Ready() <-chan struct{}

func (*Runtime) RegisterActor

func (r *Runtime) RegisterActor(actorType string, factory actor.Factory, options ...local.RegisterActorOption) error

func (*Runtime) RegisterWorkflow added in v2.16.0

func (r *Runtime) RegisterWorkflow(wf *workflow.Workflow) error

RegisterWorkflow adds a Francis workflow, registered on every host attempt.

func (*Runtime) Service

func (r *Runtime) Service() *actor.Service

func (*Runtime) Start

func (r *Runtime) Start(ctx, appCtx context.Context, onFailure func(error)) error

Start waits for host registration. appCtx owns the running host; ctx only limits startup. onFailure must cancel the application without blocking.

func (*Runtime) Stop

func (r *Runtime) Stop(ctx context.Context) error

func (*Runtime) Store added in v2.15.1

func (r *Runtime) Store() (*gorm.DB, error)

Store lazily opens a small pool on Francis storage for diagnostics and backups.

Directories

Path Synopsis
Package testing starts isolated Francis hosts for owning-logic tests.
Package testing starts isolated Francis hosts for owning-logic tests.

Jump to

Keyboard shortcuts

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