plugins

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	// contains filtered or unexported fields
}

func New

func New(dir string, api plugin.Invoker, logger *slog.Logger) (*Host, error)

func (*Host) Close

func (h *Host) Close()

func (*Host) Debug

func (h *Host) Debug(ctx context.Context, id, instanceID, code string) (plugin.DebugResult, error)

func (*Host) Emit

func (h *Host) Emit(event plugin.Event)

Emit sends an event to every matching plugin. Events are deliberately lossy: a plugin that cannot keep up must not stall the network loop.

func (*Host) List

func (h *Host) List() []plugin.Info

func (*Host) Restart

func (h *Host) Restart(id string) error

Restart reloads plugin.json and starts a fresh process. This is also the operation used by the file watcher after source changes.

func (*Host) SetObserver

func (h *Host) SetObserver(observer func(plugin.Event))

func (*Host) Start

func (h *Host) Start(id string) error

Start starts a stopped plugin. A running plugin is left untouched.

func (*Host) Stop

func (h *Host) Stop(id string) error

Stop terminates a plugin process and keeps its manifest available for a later Start or Restart.

Jump to

Keyboard shortcuts

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