source

package
v0.92.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package source provides plugin discovery from local filesystem directories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitRepoConfig

type GitRepoConfig = plugintypes.GitRepoConfig

GitRepoConfig is an alias for plugintypes.GitRepoConfig.

type LocalSource

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

LocalSource discovers plugins from a local filesystem directory.

func NewLocalSource

func NewLocalSource(dir string) *LocalSource

NewLocalSource creates a local filesystem plugin source.

func (*LocalSource) Artifact

func (s *LocalSource) Artifact(_ context.Context, name string) ([]byte, error)

Artifact returns the wasm binary or executable for a plugin.

func (*LocalSource) Close

func (*LocalSource) Close() error

func (*LocalSource) Discover

func (s *LocalSource) Discover(_ context.Context) ([]*plugin.Manifest, error)

Discover scans the directory for subdirectories with plugin.yaml.

func (*LocalSource) Watch

func (*LocalSource) Watch(_ context.Context) (<-chan SourceEvent, error)

type Source

type Source interface {
	Discover(ctx context.Context) ([]*plugin.Manifest, error)
	Artifact(ctx context.Context, name string) ([]byte, error)
	Watch(ctx context.Context) (<-chan SourceEvent, error)
	Close() error
}

Source discovers and provides plugin artifacts.

func NewSource

func NewSource(cfg SourceConfig) (Source, error)

NewSource creates a source from its configuration.

type SourceConfig

type SourceConfig = plugintypes.SourceConfig

SourceConfig is an alias for plugintypes.SourceConfig.

type SourceEvent

type SourceEvent struct {
	Name string
	Type SourceEventType
	Path string
}

SourceEvent represents a plugin source change.

type SourceEventType

type SourceEventType string

SourceEventType is the type of a source change event.

const (
	SourceUpdated SourceEventType = "updated"
	SourceRemoved SourceEventType = "removed"
)

Jump to

Keyboard shortcuts

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