modules

package
v0.99.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package modules provides fx dependency injection registration for all modules.

Index

Constants

This section is empty.

Variables

View Source
var Modules = fx.Options(
	fx.Provide(func(log zerolog.Logger, cfg *config.Type) *manager.PluginManager {
		mgr := manager.NewPluginManager(cfg.Plugins, log)
		if cfg.Plugins != nil && cfg.Plugins.Enabled {
			if err := mgr.Init(context.Background(), cfg.Plugins.Config); err != nil {
				log.Error().Err(err).Msg("plugin manager init failed")
			}
		}
		return mgr
	}),

	fx.Invoke(func(mgr *manager.PluginManager, lc fx.Lifecycle, log zerolog.Logger) {
		lc.Append(fx.Hook{
			OnStop: func(ctx context.Context) error {
				for _, inst := range mgr.List() {
					if err := mgr.UnloadPlugin(ctx, inst.Identity); err != nil {
						log.Error().Err(err).Str("plugin", inst.Identity).Msg("unload plugin failed")
					}
				}
				return nil
			},
		})
	}),

	fx.Invoke(
		example.Register,
		hub.Register,
		life.Register,
		web.Register,
		web.SetLoginRateLimiterCache,
		workflow.Register,
		pipeline.Register,
		functions.Register,
	),
)

Modules registers all interaction modules.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package example implements the example module demonstrating all module entry points.
Package example implements the example module demonstrating all module entry points.
Package functions provides the named-functions HTTP API module.
Package functions provides the named-functions HTTP API module.
Package hub implements the hub management module providing chat commands for health checks, app management, and resource tag query endpoints.
Package hub implements the hub management module providing chat commands for health checks, app management, and resource tag query endpoints.
Package life is Flowbot's solo gamified productivity module.
Package life is Flowbot's solo gamified productivity module.
Package pipeline provides the platform pipeline HTTP API module.
Package pipeline provides the platform pipeline HTTP API module.
Package web provides a web UI module with server-rendered HTML pages.
Package web provides a web UI module with server-rendered HTML pages.
Package workflow provides the platform workflow HTTP API module.
Package workflow provides the platform workflow HTTP API module.

Jump to

Keyboard shortcuts

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