registry

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginCleanup

type PluginCleanup func() error

type PluginInfo

type PluginInfo struct {
	Name     string            `json:"name"`
	Version  string            `json:"version"`
	Author   string            `json:"author,omitempty"`
	Metadata map[string]string `json:"metadata,omitempty"`

	LastSeen       time.Time `json:"last_seen"`
	LastKnownError error     `json:"-"`
	IsHealthy      bool      `json:"is_healthy"`

	Services PluginServices `json:"-"`
	Cleanup  PluginCleanup  `json:"-"`
}

type PluginRegistry

type PluginRegistry struct {
	Plugins map[string]*PluginInfo
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry() *PluginRegistry

func (*PluginRegistry) Deregister

func (reg *PluginRegistry) Deregister(name string) (*PluginInfo, error)

func (*PluginRegistry) GetPlugin

func (reg *PluginRegistry) GetPlugin(name string) (*PluginInfo, bool)

func (*PluginRegistry) GetPlugins

func (reg *PluginRegistry) GetPlugins() []*PluginInfo

func (*PluginRegistry) RegisterPlugin

func (reg *PluginRegistry) RegisterPlugin(info *PluginInfo) error

func (*PluginRegistry) Watch

func (r *PluginRegistry) Watch(ctx context.Context)

type PluginServices

type PluginServices struct {
	Identity identity.IdentityService `json:"-"`
	Tools    []tools.ToolService      `json:"-"`
}

Jump to

Keyboard shortcuts

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