client

package
v1.507.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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, bazelStartupArgs []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 types.PluginConfig, streams ioutils.Streams) (*PluginInstance, error)
}

A Factory class for constructing plugin instances.

func NewFactory

func NewFactory() Factory

type NoOpHash added in v1.507.2

type NoOpHash struct{}

NoOpHash is a hash.Hash that does nothing. It's used for plugins that are built from source and required to satisfy the upstream plugin system that expects a hash.

func (*NoOpHash) BlockSize added in v1.507.2

func (h *NoOpHash) BlockSize() int

func (*NoOpHash) Reset added in v1.507.2

func (h *NoOpHash) Reset()

func (*NoOpHash) Size added in v1.507.2

func (h *NoOpHash) Size() int

func (*NoOpHash) Sum added in v1.507.2

func (h *NoOpHash) Sum(b []byte) []byte

func (*NoOpHash) Write added in v1.507.2

func (h *NoOpHash) Write(p []byte) (n int, err error)

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