plugin

package
v0.0.0-...-8c5cae0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyProvider

type PolicyProvider interface {
	Name() string
	Policies(context.Context) ([]policy.Hook, error)
}

PolicyProvider provides policy hooks by provider name.

type ProviderConfigSchema

type ProviderConfigSchema interface {
	ConfigSchema() map[string]any
}

ProviderConfigSchema declares one provider configuration schema.

type ProviderHealthChecker

type ProviderHealthChecker interface {
	Health(context.Context) error
}

ProviderHealthChecker returns provider health status.

type ProviderInitializer

type ProviderInitializer interface {
	Init(context.Context) error
}

ProviderInitializer can initialize one provider before start.

type ProviderStarter

type ProviderStarter interface {
	Start(context.Context) error
}

ProviderStarter can start one provider before runtime use.

type ProviderStopper

type ProviderStopper interface {
	Stop(context.Context) error
}

ProviderStopper can stop one provider on runtime shutdown.

type Registry

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

Registry is a compile-time registration container.

func NewRegistry

func NewRegistry() *Registry

func (*Registry) ListPolicyProviders

func (r *Registry) ListPolicyProviders() []string

func (*Registry) ListToolProviders

func (r *Registry) ListToolProviders() []string

func (*Registry) PolicyProviderSchemas

func (r *Registry) PolicyProviderSchemas() map[string]map[string]any

func (*Registry) PolicyProviders

func (r *Registry) PolicyProviders(names []string) ([]PolicyProvider, error)

func (*Registry) RegisterPolicyProvider

func (r *Registry) RegisterPolicyProvider(p PolicyProvider) error

func (*Registry) RegisterToolProvider

func (r *Registry) RegisterToolProvider(p ToolProvider) error

func (*Registry) ResolvePolicies

func (r *Registry) ResolvePolicies(ctx context.Context, names []string) ([]policy.Hook, error)

func (*Registry) ResolveTools

func (r *Registry) ResolveTools(ctx context.Context, names []string) ([]tool.Tool, error)

func (*Registry) ToolProviderSchemas

func (r *Registry) ToolProviderSchemas() map[string]map[string]any

func (*Registry) ToolProviders

func (r *Registry) ToolProviders(names []string) ([]ToolProvider, error)

type ToolProvider

type ToolProvider interface {
	Name() string
	Tools(context.Context) ([]tool.Tool, error)
}

ToolProvider provides tools by provider name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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