Documentation
¶
Index ¶
- Constants
- func InitToolFTSListeners(baseDir string, builtInLister ToolBuiltInLister) (*ftsengine.Engine, error)
- func NewUserToolsFTSListener(e *ftsengine.Engine) mapstore.FileListener
- func ReindexOneBuiltInTool(ctx context.Context, bundleID bundleitemutils.BundleID, ...) error
- func StartBuiltInToolsFTSRebuild(ctx context.Context, lister ToolBuiltInLister, engine *ftsengine.Engine)
- func StartUserToolsFTSRebuild(ctx context.Context, baseDir string, e *ftsengine.Engine)
- type ToolBuiltInLister
Constants ¶
View Source
const (
BuiltInDocPrefix = "bi/"
)
Every built-in document ID is prefixed with this constant so that existing path-parsing code can still split bundleDir / fileName.
Variables ¶
This section is empty.
Functions ¶
func InitToolFTSListeners ¶
func InitToolFTSListeners( baseDir string, builtInLister ToolBuiltInLister, ) (*ftsengine.Engine, error)
InitToolFTSListeners initialises the tools FTS database and starts background rebuild jobs.
func NewUserToolsFTSListener ¶
func NewUserToolsFTSListener(e *ftsengine.Engine) mapstore.FileListener
NewUserToolsFTSListener returns a mapstore.FileListener that updates the FTS engine on file changes.
func ReindexOneBuiltInTool ¶
func ReindexOneBuiltInTool( ctx context.Context, bundleID bundleitemutils.BundleID, bundleSlug bundleitemutils.BundleSlug, tool spec.Tool, engine *ftsengine.Engine, ) error
ReindexOneBuiltInTool updates exactly one built-in tool.
func StartBuiltInToolsFTSRebuild ¶
func StartBuiltInToolsFTSRebuild( ctx context.Context, lister ToolBuiltInLister, engine *ftsengine.Engine, )
StartBuiltInToolsFTSRebuild spawns a goroutine that synchronises the built-in tools with the FTS index.
Types ¶
type ToolBuiltInLister ¶
type ToolBuiltInLister func(ctx context.Context) ( bundles map[bundleitemutils.BundleID]spec.ToolBundle, tools map[bundleitemutils.BundleID]map[bundleitemutils.ItemID]spec.Tool, err error, )
ToolBuiltInLister returns the current snapshot of all built-in bundles and tools. Overlay should already be applied, so that enabled flags are correct.
Click to show internal directories.
Click to hide internal directories.