Documentation
¶
Overview ¶
Package francis owns the embedded Francis host lifecycle.
Index ¶
- Constants
- func ClearRestoredHosts(ctx context.Context, databaseURL string) (err error)
- func MigrateLegacyStore(ctx context.Context, mainDB *sql.DB, databaseURL string) (err error)
- func StorePath(databasePath string) string
- func StoreURL(databaseURL string) (string, error)
- type Runtime
- func (r *Runtime) ActorName(actorID string) string
- func (r *Runtime) ConfigureIdentity(encryptionKey, instanceID string) error
- func (r *Runtime) Done() <-chan struct{}
- func (r *Runtime) NameActor(actorID, name string)
- func (r *Runtime) Ready() <-chan struct{}
- func (r *Runtime) RegisterActor(actorType string, factory actor.Factory, options ...local.RegisterActorOption) error
- func (r *Runtime) RegisterWorkflow(wf *workflow.Workflow) error
- func (r *Runtime) Service() *actor.Service
- func (r *Runtime) Start(ctx, appCtx context.Context, onFailure func(error)) error
- func (r *Runtime) Stop(ctx context.Context) error
- func (r *Runtime) Store() (*gorm.DB, error)
Constants ¶
const TablePrefix = "arcane_francis"
TablePrefix namespaces the Francis tables in their store.
Variables ¶
This section is empty.
Functions ¶
func ClearRestoredHosts ¶
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
MigrateLegacyStore moves Francis state kept inside the Arcane SQLite database into its dedicated file, then drops the old tables. Reruns until the drop succeeds.
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 ¶
ActorName returns the display name set by NameActor, or an empty string.
func (*Runtime) ConfigureIdentity ¶
ConfigureIdentity binds the final persisted identity before Start.
func (*Runtime) NameActor ¶
NameActor changes only the log display; durable actor IDs remain unchanged.
func (*Runtime) RegisterActor ¶
func (*Runtime) RegisterWorkflow ¶ added in v2.16.0
RegisterWorkflow adds a Francis workflow, registered on every host attempt.