type

StoreFactory

Lazy lifecycle-owned document-store constructor.

Arguments

ArgumentTypeDescription
ctxcontext.ContextThe server lifecycle context, cancelled during shutdown.

Returns

One opened adapter owned by Execute, or a startup error.

(store.Store, error)

How it works

Project commands resolve configuration without calling this factory. Execute closes the returned store during shutdown.

Full signature

type StoreFactory func(context.Context) (store.Store, error)

Source core/execute.go:36

Related types

  • Store

    Starts atomic transactions for operations.