target

package
v0.2.0-beta3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MPL-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	Impl Target
}

Plugin is the plugin.Plugin

func (Plugin) Client

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

func (*Plugin) Server

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

type RPC

type RPC struct {
	// contains filtered or unexported fields
}

RPC is a plugin implementation that talks over net/rpc

func (*RPC) PluginInfo

func (r *RPC) PluginInfo() (*base.PluginInfo, error)

func (*RPC) Scale

func (r *RPC) Scale(action sdk.ScalingAction, config map[string]string) error

func (*RPC) SetConfig

func (r *RPC) SetConfig(config map[string]string) error

func (*RPC) Status

func (r *RPC) Status(config map[string]string) (*sdk.TargetStatus, error)

type RPCScaleRequest

type RPCScaleRequest struct {
	Action sdk.ScalingAction
	Config map[string]string
}

type RPCServer

type RPCServer struct {
	Impl Target
}

RPCServer is the net/rpc server

func (*RPCServer) PluginInfo

func (s *RPCServer) PluginInfo(_ interface{}, r *base.PluginInfo) error

func (*RPCServer) Scale

func (s *RPCServer) Scale(req RPCScaleRequest, resp *error) error

func (*RPCServer) SetConfig

func (s *RPCServer) SetConfig(config map[string]string, resp *error) error

func (*RPCServer) Status

func (s *RPCServer) Status(config map[string]string, resp *sdk.TargetStatus) error

type Target

type Target interface {
	Scale(action sdk.ScalingAction, config map[string]string) error
	Status(config map[string]string) (*sdk.TargetStatus, error)
	PluginInfo() (*base.PluginInfo, error)
	SetConfig(config map[string]string) error
}

Jump to

Keyboard shortcuts

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