registry

package
v0.0.0-testrgm6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemory

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

func NewInMemory

func NewInMemory() *InMemory

func ProvideService

func ProvideService() *InMemory

func (*InMemory) Add

func (i *InMemory) Add(_ context.Context, p *plugins.Plugin) error

func (*InMemory) Plugin

func (i *InMemory) Plugin(_ context.Context, pluginID string) (*plugins.Plugin, bool)

func (*InMemory) Plugins

func (i *InMemory) Plugins(_ context.Context) []*plugins.Plugin

func (*InMemory) Remove

func (i *InMemory) Remove(_ context.Context, pluginID string) error

type Service

type Service interface {
	// Plugin finds a plugin by its ID.
	Plugin(ctx context.Context, id string) (*plugins.Plugin, bool)
	// Plugins returns all plugins.
	Plugins(ctx context.Context) []*plugins.Plugin
	// Add adds the provided plugin to the registry.
	Add(ctx context.Context, plugin *plugins.Plugin) error
	// Remove deletes the requested plugin from the registry.
	Remove(ctx context.Context, id string) error
}

Service is responsible for the internal storing and retrieval of plugins.

Jump to

Keyboard shortcuts

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