Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoMatchingArtifact = errors.New("no artifact matches the current system") ErrUnsupportedArch = errors.New("your system architecture is not yet supported") )
Functions ¶
func DownloadPlugin ¶
func FindMatchingArtifact ¶
func FindMatchingArtifact(plg structs.PluginDesc) (string, string, error)
Types ¶
type Installer ¶
type Installer interface { // InstallPlugin should install the plugin defined in desc at the // local system and return the path to the installed binary. InstallPlugin(ctx context.Context, desc structs.PluginDesc) (string, error) }
Installer defines the interface that is capable of downloading and installing plugins.
type PluginInstaller ¶
type PluginInstaller struct { // TargetDirectory is the directory where plugins should be installed. TargetDirectory string }
PluginInstaller implements the Installer interface and is capable of downloading and installing binary plugins at the local host.
func (*PluginInstaller) InstallPlugin ¶
func (installer *PluginInstaller) InstallPlugin(ctx context.Context, plg structs.PluginDesc) (string, error)
InstallPlugin installs the plugin in the target directory and returns the path of the installed plugin binary.
Click to show internal directories.
Click to hide internal directories.