target

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MPL-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginTarget added in v0.3.0

type PluginTarget struct {

	// Embedded so we disable support for net/rpc based plugins.
	plugin.NetRPCUnsupportedPlugin

	// Impl is the Target interface implementation that the plugin serves.
	Impl Target
}

PluginTarget is the Target implementation of the go-plugin GRPCPlugin interface.

func (*PluginTarget) GRPCClient added in v0.3.0

func (p *PluginTarget) GRPCClient(ctx context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

GRPCClient is the Target implementation of the go-plugin GRPCPlugin.GRPCClient interface function.

func (*PluginTarget) GRPCServer added in v0.3.0

func (p *PluginTarget) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

GRPCServer is the Target implementation of the go-plugin GRPCPlugin.GRPCServer interface function.

type Target

type Target interface {

	// Embed base.Base ensuring that strategy plugins implement this interface.
	base.Base

	// Scale triggers a scaling action against the remote target as specified
	// by the config func argument.
	Scale(action sdk.ScalingAction, config map[string]string) error

	// Status collects and returns critical information of the status of the
	// remote target. The information is used to understand whether the target
	// is in a position to be scaled as well as the current running count which
	// will be used when performing the strategy calculation.
	Status(config map[string]string) (*sdk.TargetStatus, error)
}

Target is the interface that all Target plugins are required to implement. The plugins are responsible for providing status details of the remote target, as well as carrying out scaling actions as decided by the Strategy plugin and internal autoscaler controls.

Directories

Path Synopsis
proto
v1

Jump to

Keyboard shortcuts

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