Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 DefaultProvider PluginBackendProvider = func(_ context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc { return grpcplugin.NewBackendPlugin(p.ID, filepath.Join(p.PluginDir, pluginStartCmd(p.Executable))) }
var RendererProvider PluginBackendProvider = func(_ context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc { if !p.IsRenderer() { return nil } return grpcplugin.NewRendererPlugin(p.ID, filepath.Join(p.PluginDir, rendererStartCmd()), 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, filepath.Join(p.PluginDir, secretsManagerStartCmd()), 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.