plugin

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: AGPL-3.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureCorePlugin added in v0.3.0

func EnsureCorePlugin(ctx context.Context) (*versionfile.PluginVersionFile, error)

EnsureCorePlugin ensures the core plugin is installed or the min version is satisfied

func GetInstalledPlugins

func GetInstalledPlugins(ctx context.Context, pluginVersions map[string]*versionfile.InstalledVersion) (map[string]*plugin.PluginVersionString, error)

GetInstalledPlugins returns the list of plugins keyed by the shortname (org/name) and its specific version Does not validate/check of available connections

func Install

func Install(ctx context.Context, plugin plugin.ResolvedPluginVersion, sub chan struct{}, baseImageRef string, mediaTypesProvider ociinstaller.MediaTypeProvider) (*ociinstaller.OciImage[*ociinstaller.PluginImage, *ociinstaller.PluginImageConfig], error)

Install installs a plugin in the local file system

func IsNotImplementedError added in v0.6.0

func IsNotImplementedError(err error) bool

Types

type CollectResponse added in v0.2.0

type CollectResponse struct {
	ExecutionId string
	Schema      *schema.TableSchema
	FromTime    *row_source.ResolvedFromTime
}

func CollectResponseFromProto added in v0.2.0

func CollectResponseFromProto(resp *proto.CollectResponse) *CollectResponse

type DescribeOpts added in v0.2.0

type DescribeOpts func(*proto.DescribeRequest)

func WithCustomFormats added in v0.2.0

func WithCustomFormats(customFormats ...*config.Format) DescribeOpts

func WithCustomFormatsOnly added in v0.2.0

func WithCustomFormatsOnly() DescribeOpts

type PluginManager added in v0.2.0

type PluginManager struct {
	// map of running plugins, keyed by plugin name
	Plugins map[string]*grpc.PluginClient
	// contains filtered or unexported fields
}

func NewPluginManager added in v0.2.0

func NewPluginManager() *PluginManager

func (*PluginManager) AddObserver added in v0.2.0

func (p *PluginManager) AddObserver(o observable.Observer)

AddObserver adds a n observer to the plugin manager

func (*PluginManager) Close added in v0.2.0

func (p *PluginManager) Close()

func (*PluginManager) Collect added in v0.2.0

func (p *PluginManager) Collect(ctx context.Context, partition *config.Partition, fromTime time.Time, toTime time.Time, recollect bool, collectionTempDir string) (*CollectResponse, error)

Collect starts the plugin if needed, discovers the artifacts and download them for the given partition.

func (*PluginManager) Describe added in v0.2.0

func (p *PluginManager) Describe(_ context.Context, pluginName string, opts ...DescribeOpts) (*types.DescribeResponse, error)

Describe starts the plugin if needed, and returns the plugin description, including description of any custom formats

func (*PluginManager) UpdateCollectionState added in v0.2.0

func (p *PluginManager) UpdateCollectionState(ctx context.Context, partition *config.Partition, fromTime time.Time, collectionStatePath string) error

type PluginNameVersion

type PluginNameVersion struct {
	Name    string
	Version *plugin.PluginVersionString
}

PluginNameVersion is a struct representing an item in the list of plugins

func List

func List(ctx context.Context, pluginVersions map[string]*versionfile.InstalledVersion, fileNameFilter *string) ([]PluginNameVersion, error)

List returns all installed plugins by finding plugin binaries in the plugin directory

type PluginRemoveReport

type PluginRemoveReport struct {
	Image     *ociinstaller.ImageRef
	ShortName string
}

func Remove

func Remove(ctx context.Context, image string) (*PluginRemoveReport, error)

Remove removes an installed plugin

type PluginRemoveReports

type PluginRemoveReports []PluginRemoveReport

func (PluginRemoveReports) Print

func (r PluginRemoveReports) Print()

Jump to

Keyboard shortcuts

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