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) Close ¶
func (*LocalSource) Close() error
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" )
Click to show internal directories.
Click to hide internal directories.