Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProvider = PluginBackendProvider(func(_ context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc { return grpcplugin.NewBackendPlugin(p.ID, p.ExecutablePath(), p.SkipHostEnvVars) })
Functions ¶
This section is empty.
Types ¶
type PluginBackendProvider ¶
type PluginBackendProvider func(_ context.Context, _ *plugins.Plugin) backendplugin.PluginFactoryFunc
PluginBackendProvider is a function type for initializing a Plugin backend.
var RendererProvider PluginBackendProvider = func(_ context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc { if !p.IsRenderer() { return nil } return grpcplugin.NewRendererPlugin(p.ID, p.ExecutablePath(), func(pluginID string, renderer pluginextensionv2.RendererPlugin, logger log.Logger) error { p.Renderer = renderer return nil }, ) }
var SecretsManagerProvider PluginBackendProvider = func(_ context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc { if !p.IsSecretsManager() { return nil } return grpcplugin.NewSecretsManagerPlugin(p.ID, p.ExecutablePath(), func(pluginID string, secretsmanager secretsmanagerplugin.SecretsManagerPlugin, logger log.Logger) error { p.SecretsManager = secretsmanager return nil }, ) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(providers ...PluginBackendProvider) *Service
func ProvideService ¶
func ProvideService(coreRegistry *coreplugin.Registry) *Service
func (*Service) BackendFactory ¶
func (s *Service) BackendFactory(ctx context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc
Click to show internal directories.
Click to hide internal directories.