plugin

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package plugin provides an extensible plugin system for AUTO

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasePlugin

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

BasePlugin provides a base implementation for plugins

func NewBasePlugin

func NewBasePlugin(info Info) *BasePlugin

NewBasePlugin creates a new base plugin with the given info

func (*BasePlugin) Info

func (p *BasePlugin) Info() Info

Info returns the plugin info

func (*BasePlugin) Name

func (p *BasePlugin) Name() string

Name returns the plugin name

func (*BasePlugin) Type

func (p *BasePlugin) Type() string

Type returns the plugin type

type Info

type Info struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	Description string `json:"description"`
	Author      string `json:"author"`
	Type        string `json:"type"` // Provider type identifier
}

Info contains metadata about a plugin

type Manager

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

Manager handles plugin lifecycle

func NewManager

func NewManager(registry *agent.Registry) *Manager

NewManager creates a new plugin manager

func (*Manager) DiscoverAll

func (m *Manager) DiscoverAll(ctx context.Context) ([]agent.Agent, error)

DiscoverAll discovers agents from all plugins

func (*Manager) Get

func (m *Manager) Get(name string) (Plugin, bool)

Get returns a plugin by name

func (*Manager) List

func (m *Manager) List() []Plugin

List returns all registered plugins

func (*Manager) ListInfo

func (m *Manager) ListInfo() []Info

ListInfo returns info for all registered plugins

func (*Manager) Register

func (m *Manager) Register(plugin Plugin) error

Register adds a plugin to the manager

func (*Manager) Unregister

func (m *Manager) Unregister(name string) error

Unregister removes a plugin from the manager

type Plugin

type Plugin interface {
	agent.Provider
	Info() Info
}

Plugin extends agent.Provider with metadata

Jump to

Keyboard shortcuts

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