plugin

package
v0.0.0-...-fdc0f55 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFromClientBinaries

func RegisterFromClientBinaries(
	ctx context.Context,
	reg config.ProviderRegistry,
	settingsList []ClientBinarySettings,
) (func(), error)

RegisterFromClientBinaries registers the given client binaries as remote plugins.

func ServeRegistry

func ServeRegistry(registry config.ProviderRegistry)

ServeRegistry serves the given registry as a plugin.

Types

type ClientBinarySettings

type ClientBinarySettings struct {
	// Namespace - the namespace of the plugin
	Namespace string
	// Path - the absolute path to the plugin binary
	Path string
	// Args - optional arguments to pass to the plugin binary
	Args []string
}

ClientBinarySettings defines a namespaced plugin binary. The binary is expected to be used as a remote plugin.

type Interface

type Interface interface {
	// GetNames returns the names of the available config providers
	GetNames() ([]string, error)

	// Resolve resolves a config from a config provider.
	Resolve(req ResolveRequest) (string, error)
}

Interface defines the config plugin interface.

type Plugin

type Plugin struct {
	Impl Interface
}

func (*Plugin) Client

func (p *Plugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*Plugin) Server

func (p *Plugin) Server(*plugin.MuxBroker) (interface{}, error)

type ResolveRequest

type ResolveRequest struct {
	Name                      string
	ContextDeadlineInUnixNano int64
	UserInput                 map[string]any
	TargetKubeconfig          string
}

func (ResolveRequest) Context

func (ResolveRequest) Target

func (rr ResolveRequest) Target() target.Target

Jump to

Keyboard shortcuts

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