client

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineExecutableFilenameSuffix

func DetermineExecutableFilenameSuffix() string

DetermineExecutableFilenameSuffix returns the extension for binaries on the current operating system.

func DeterminePluginFilename

func DeterminePluginFilename(pluginName string) (string, error)

DetermineBazelFilename returns the correct file name of a local Bazel binary. The logic produces the same naming as our /release/release.bzl gives to our aspect-cli binaries.

func DownloadPlugin

func DownloadPlugin(url string, name string, version string) (string, error)

Types

type CustomCommandExecutor

type CustomCommandExecutor interface {
	ExecuteCustomCommand(cmdName string, ctx context.Context, args []string) error
}

CustomCommandExecutor requires the Plugin implementations to provide the ExecuteCustomCommand method so that the Core can ask over gRPC for a specific command to be executed. `cmdName` is the name of the custom command the plugin created.

type Factory

type Factory interface {
	New(config loader.AspectPlugin, streams ioutils.Streams) (*PluginInstance, error)
}

A Factory class for constructing plugin instances.

func NewFactory

func NewFactory() Factory

type PluginInstance

type PluginInstance struct {
	plugin.Plugin
	Provider
	CustomCommandExecutor
}

A PluginInstance consists of the underling Plugin as well as any associated objects or metadata.

type Provider

type Provider interface {
	Client() (goplugin.ClientProtocol, error)
	Kill()
}

Provider is an interface for goplugin.Client returned by goplugin.NewClient.

Directories

Path Synopsis
Package mock contains generated files.
Package mock contains generated files.

Jump to

Keyboard shortcuts

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