Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discoverer ¶
type Discoverer interface {
Discover(ctx context.Context, src plugins.PluginSource) ([]*plugins.FoundBundle, error)
}
Discoverer is responsible for the Discovery stage of the plugin loader pipeline.
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
Discovery implements the Discoverer interface.
The Discovery stage is made up of the following steps (in order): - Find: Find plugins (from disk, remote, etc.) - Filter: Filter the results based on some criteria.
The Find step is implemented by the FindFunc type.
The Filter step is implemented by the FindFilterFunc type.
func (*Discovery) Discover ¶
func (d *Discovery) Discover(ctx context.Context, src plugins.PluginSource) ([]*plugins.FoundBundle, error)
Discover will execute the Find and Filter steps of the Discovery stage.
type DuplicatePluginValidation ¶
type DuplicatePluginValidation struct {
// contains filtered or unexported fields
}
DuplicatePluginValidation is a filter step that will filter out any plugins that are already registered with the registry. This includes both the primary plugin and any child plugins, which are matched using the plugin ID field.
func NewDuplicatePluginFilterStep ¶
func NewDuplicatePluginFilterStep(registry registry.Service) *DuplicatePluginValidation
NewDuplicatePluginFilterStep returns a new DuplicatePluginValidation.
func (*DuplicatePluginValidation) Filter ¶
func (d *DuplicatePluginValidation) Filter(ctx context.Context, bundles []*plugins.FoundBundle) ([]*plugins.FoundBundle, error)
Filter will filter out any plugins that are already registered with the registry.
type FindFilterFunc ¶
type FindFilterFunc func(ctx context.Context, class plugins.Class, bundles []*plugins.FoundBundle) ([]*plugins.FoundBundle, error)
FindFilterFunc is the function used for the Filter step of the Discovery stage.
type FindFunc ¶
type FindFunc func(ctx context.Context, src plugins.PluginSource) ([]*plugins.FoundBundle, error)
FindFunc is the function used for the Find step of the Discovery stage.
func DefaultFindFunc ¶
DefaultFindFunc is the default function used for the Find step of the Discovery stage. It will scan the local filesystem for plugins.
type Opts ¶
type Opts struct { FindFunc FindFunc FindFilterFuncs []FindFilterFunc }