Documentation
¶
Index ¶
- func NewEventBus(bufferSize int, logger *zap.Logger) *eventBus
- type Config
- type Runtime
- func (r *Runtime) BootOrder() []string
- func (r *Runtime) Bootstrap(ctx context.Context) error
- func (r *Runtime) GetPluginModels() map[string][]any
- func (r *Runtime) GetPluginState(name string) (plugin.PluginState, bool)
- func (r *Runtime) ListPlugins() map[string]plugin.PluginState
- func (r *Runtime) Publish(ctx context.Context, event plugin.Event) error
- func (r *Runtime) Register(p plugin.Plugin) error
- func (r *Runtime) Services() *plugin.ServiceRegistry
- func (r *Runtime) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventBus ¶
NewEventBus creates a new EventBus with the given buffer size.
Types ¶
type Config ¶
type Config struct {
Router chi.Router
DB plugin.Database
Redis *redis.Client
Logger *zap.Logger
EventBuffer int // default 1024
}
Config holds configuration for creating a new Runtime.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime manages plugin lifecycle with correct dependency ordering.
func (*Runtime) GetPluginModels ¶
GetPluginModels returns models registered by plugins.
func (*Runtime) GetPluginState ¶
func (r *Runtime) GetPluginState(name string) (plugin.PluginState, bool)
GetPluginState returns the state of a plugin by name.
func (*Runtime) ListPlugins ¶
func (r *Runtime) ListPlugins() map[string]plugin.PluginState
ListPlugins returns a snapshot of all plugin states.
func (*Runtime) Services ¶
func (r *Runtime) Services() *plugin.ServiceRegistry
Services returns the plugin service registry for pre-registering core services. Must be called before Bootstrap.
Click to show internal directories.
Click to hide internal directories.