Documentation
¶
Overview ¶
Package plugins provides the plugin infrastructure for ViewRA. It supports loading and managing external plugins that extend the server's functionality.
The package is organized into sub-packages:
- grpc/ - gRPC plugin implementations for go-plugin framework
- host/ - Host services exposed to plugins (data, storage, weather, plugins)
- logging/ - slog to hclog adapter for plugin logging
- manager/ - Plugin lifecycle management (load, unload, restart, health)
- manifest/ - Plugin manifest (plugin.yml) parsing
- pool/ - Warm pool for plugin pre-loading
- proxy/ - HTTP proxy for plugin routes
- querier/ - Media query interface for plugins
- registry/ - Registries for routes, capabilities, providers, rate limits
- types/ - Shared types (Instance, Health, Category, Handshake)
This file re-exports the main types for backward compatibility. Callers can import the sub-packages directly for more specific access.
Index ¶
- Constants
- Variables
- type Category
- type EnricherGRPCPlugin
- type Factory
- type GRPCEnricher
- type HTTPProxy
- type Health
- type HostDataBrokerInfo
- type HostDataGRPCPlugin
- type HostDataServer
- type HostPluginsBrokerInfo
- type HostPluginsGRPCPlugin
- type HostPluginsServer
- type HostProgressBrokerInfo
- type HostProgressGRPCPlugin
- type HostProgressServer
- type HostRatingsBrokerInfo
- type HostRatingsGRPCPlugin
- type HostRatingsServer
- type HostStorageBrokerInfo
- type HostStorageConfig
- type HostStorageGRPCPlugin
- type HostStorageServer
- type HostWeatherBrokerInfo
- type HostWeatherGRPCPlugin
- type HostWeatherServer
- type Manager
- type ManagerConfig
- type MediaQuerier
- type PluginCoreGRPCPlugin
- type PluginInstance
- type PluginProviderGRPCPlugin
Constants ¶
const ( CategoryEnricher = types.CategoryEnricher CategoryNotificationSink = types.CategoryNotificationSink CategoryProvider = types.CategoryProvider )
Category constants.
Variables ¶
var ( // ContextWithPluginID adds a plugin ID to a context. ContextWithPluginID = host.ContextWithPluginID // GetPluginIDFromContext retrieves the plugin ID from a context. GetPluginIDFromContext = host.GetPluginIDFromContext )
Context helpers re-exported from host package.
var ( LoggingInterceptor = pluginsgrpc.LoggingInterceptor LoggingStreamInterceptor = pluginsgrpc.LoggingStreamInterceptor )
Logging interceptors re-exported from grpc package.
var Handshake = types.Handshake
Handshake is the shared handshake config for all plugins.
var NewFactory = pluginsgrpc.NewFactory
NewFactory creates a new plugin factory.
var NewGRPCEnricher = pluginsgrpc.NewEnricher
NewGRPCEnricher creates a new GRPCEnricher wrapping the given client.
var NewHTTPProxy = proxy.NewHTTPProxy
NewHTTPProxy creates a new HTTP proxy for plugin routes.
var NewHostDataServer = host.NewDataServer
NewHostDataServer creates a new host data server.
var NewHostPluginsServer = host.NewPluginsServer
NewHostPluginsServer creates a new host plugins server.
var NewHostProgressServer = host.NewProgressServer
NewHostProgressServer creates a new host progress server.
var NewHostRatingsServer = host.NewRatingsServer
NewHostRatingsServer creates a new host ratings server.
var NewHostStorageServer = host.NewStorageServer
NewHostStorageServer creates a new host storage server.
var NewHostWeatherServer = host.NewWeatherServer
NewHostWeatherServer creates a new host weather server.
var NewManager = manager.NewManager
NewManager creates a new plugin manager.
Functions ¶
This section is empty.
Types ¶
type EnricherGRPCPlugin ¶
type EnricherGRPCPlugin = pluginsgrpc.EnricherPlugin
EnricherGRPCPlugin is the go-plugin implementation for the Enricher service.
type Factory ¶
type Factory = pluginsgrpc.Factory
Factory creates go-plugin Plugin instances for the plugin manager.
type GRPCEnricher ¶
type GRPCEnricher = pluginsgrpc.Enricher
GRPCEnricher wraps a gRPC EnricherClient to implement the application Enricher interface.
type HostDataBrokerInfo ¶
type HostDataBrokerInfo = pluginsgrpc.HostDataBrokerInfo
Broker info types
type HostDataGRPCPlugin ¶
type HostDataGRPCPlugin = pluginsgrpc.HostDataPlugin
HostDataGRPCPlugin is the go-plugin implementation for the HostData service.
type HostDataServer ¶
type HostDataServer = host.DataServer
HostDataServer provides media data access to plugins.
type HostPluginsBrokerInfo ¶
type HostPluginsBrokerInfo = pluginsgrpc.HostPluginsBrokerInfo
gRPC plugin types re-exported from grpc package.
type HostPluginsGRPCPlugin ¶
type HostPluginsGRPCPlugin = pluginsgrpc.HostPluginsPlugin
HostPluginsGRPCPlugin is the go-plugin implementation for the HostPlugins service.
type HostPluginsServer ¶
type HostPluginsServer = host.PluginsServer
HostPluginsServer provides capability-based plugin discovery.
type HostProgressBrokerInfo ¶
type HostProgressBrokerInfo = pluginsgrpc.HostProgressBrokerInfo
gRPC plugin types re-exported from grpc package.
type HostProgressGRPCPlugin ¶
type HostProgressGRPCPlugin = pluginsgrpc.HostProgressPlugin
HostProgressGRPCPlugin is the go-plugin implementation for the HostProgress service.
type HostProgressServer ¶
type HostProgressServer = host.ProgressServer
HostProgressServer provides watch progress access to plugins.
type HostRatingsBrokerInfo ¶
type HostRatingsBrokerInfo = pluginsgrpc.HostRatingsBrokerInfo
gRPC plugin types re-exported from grpc package.
type HostRatingsGRPCPlugin ¶
type HostRatingsGRPCPlugin = pluginsgrpc.HostRatingsPlugin
HostRatingsGRPCPlugin is the go-plugin implementation for the HostRatings service.
type HostRatingsServer ¶
type HostRatingsServer = host.RatingsServer
HostRatingsServer provides user ratings access to plugins.
type HostStorageBrokerInfo ¶
type HostStorageBrokerInfo = pluginsgrpc.HostStorageBrokerInfo
gRPC plugin types re-exported from grpc package.
type HostStorageConfig ¶
type HostStorageConfig = host.StorageConfig
HostStorageConfig contains configuration for the host storage server.
type HostStorageGRPCPlugin ¶
type HostStorageGRPCPlugin = pluginsgrpc.HostStoragePlugin
HostStorageGRPCPlugin is the go-plugin implementation for the HostStorage service.
type HostStorageServer ¶
type HostStorageServer = host.StorageServer
HostStorageServer provides storage services to plugins.
type HostWeatherBrokerInfo ¶
type HostWeatherBrokerInfo = pluginsgrpc.HostWeatherBrokerInfo
gRPC plugin types re-exported from grpc package.
type HostWeatherGRPCPlugin ¶
type HostWeatherGRPCPlugin = pluginsgrpc.HostWeatherPlugin
HostWeatherGRPCPlugin is the go-plugin implementation for the HostWeather service.
type HostWeatherServer ¶
type HostWeatherServer = host.WeatherServer
HostWeatherServer provides weather context to plugins.
type ManagerConfig ¶
type ManagerConfig = manager.ManagerConfig
ManagerConfig contains configuration for the plugin manager.
type MediaQuerier ¶
type MediaQuerier = host.MediaQuerier
MediaQuerier provides media query operations for plugins.
type PluginCoreGRPCPlugin ¶
type PluginCoreGRPCPlugin = pluginsgrpc.PluginCorePlugin
PluginCoreGRPCPlugin is the go-plugin implementation for the PluginCore service.
type PluginInstance ¶
PluginInstance represents a loaded and running plugin. Deprecated: Use types.Instance instead.
type PluginProviderGRPCPlugin ¶
type PluginProviderGRPCPlugin = pluginsgrpc.PluginProviderPlugin
PluginProviderGRPCPlugin is the go-plugin implementation for the PluginProvider service.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package fetcher provides implementations for fetching data from plugins.
|
Package fetcher provides implementations for fetching data from plugins. |
|
Package github provides a client for fetching plugin releases from GitHub.
|
Package github provides a client for fetching plugin releases from GitHub. |
|
Package grpc provides gRPC plugin implementations for the go-plugin framework.
|
Package grpc provides gRPC plugin implementations for the go-plugin framework. |
|
Package host provides gRPC server implementations for host services exposed to plugins.
|
Package host provides gRPC server implementations for host services exposed to plugins. |
|
Package manager provides the plugin Manager for loading, managing, and monitoring plugins.
|
Package manager provides the plugin Manager for loading, managing, and monitoring plugins. |
|
Package manifest provides parsing and validation for plugin.yml manifest files.
|
Package manifest provides parsing and validation for plugin.yml manifest files. |
|
Package proxy provides HTTP proxying for plugin routes.
|
Package proxy provides HTTP proxying for plugin routes. |
|
Package registry provides route, provider, and capability registries for plugins.
|
Package registry provides route, provider, and capability registries for plugins. |
|
Package types provides shared types for the plugins infrastructure.
|
Package types provides shared types for the plugins infrastructure. |