Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
Impl Strategy
}
Plugin is the plugin.Plugin
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
func (*RPC) PluginInfo ¶
func (r *RPC) PluginInfo() (*base.PluginInfo, error)
func (*RPC) Run ¶
func (r *RPC) Run(eval *sdk.ScalingCheckEvaluation, count int64) (*sdk.ScalingCheckEvaluation, error)
type RPCServer ¶
type RPCServer struct {
Impl Strategy
}
func (*RPCServer) PluginInfo ¶
func (s *RPCServer) PluginInfo(_ interface{}, r *base.PluginInfo) error
type RunRPCReq ¶ added in v0.2.0
type RunRPCReq struct { Eval *sdk.ScalingCheckEvaluation Count int64 }
RunRPCReq is an internal request object used by the Run function that ties together the two input variables as a single object as needed when calling the RPCServer.
type Strategy ¶
type Strategy interface { // Run triggers a run of the strategy calculation. It is responsible for // populating the sdk.ScalingAction object within the passed eval and // returning the eval to the caller. The count input variable represents // the current state of the scaling target. Run(eval *sdk.ScalingCheckEvaluation, count int64) (*sdk.ScalingCheckEvaluation, error) PluginInfo() (*base.PluginInfo, error) SetConfig(config map[string]string) error }
Click to show internal directories.
Click to hide internal directories.