Documentation
¶
Index ¶
- type Config
- type Plugin
- func (p *Plugin) ClusterRunPreScaleInTasks(ctx context.Context, blueprint instance.Server, config map[string]string, ...) ([]scaleutils.NodeResourceID, error)
- func (p *Plugin) LookupNodeID(node *api.Node) (id string, err error)
- func (p *Plugin) PluginInfo() (*base.PluginInfo, error)
- func (p *Plugin) Scale(action sdk.ScalingAction, config map[string]string) error
- func (p *Plugin) ScaleDown(ctx context.Context, blueprint instance.Server, n int64, ...) error
- func (p *Plugin) ScaleUp(blueprint instance.Server, n int64, opt *instance.ServerOpt) error
- func (p *Plugin) SetConfig(config map[string]string) error
- func (p *Plugin) Status(config map[string]string) (*sdk.TargetStatus, error)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AccessKey string `mapstructure:"access_key"` SecretKey string `mapstructure:"secret_key"` OrgID string `mapstructure:"organization_id"` ProjectID string `mapstructure:"project_id"` Region string `mapstructure:"region"` Zone string `mapstructure:"zone"` }
Config represents a plugin configuration object
type Plugin ¶
type Plugin struct { State // contains filtered or unexported fields }
Plugin represents the Scaleway target plugin
func (*Plugin) ClusterRunPreScaleInTasks ¶
func (p *Plugin) ClusterRunPreScaleInTasks(ctx context.Context, blueprint instance.Server, config map[string]string, num int) ([]scaleutils.NodeResourceID, error)
ClusterRunPreScaleInTasks is a temporary alternative to the built-in `RunPreScaleInTasks`, see https://github.com/hashicorp/nomad-autoscaler/issues/572 for more information.
func (*Plugin) LookupNodeID ¶
LookupNodeID translates a Nomad node ID to a Scaleway ID
func (*Plugin) PluginInfo ¶
func (p *Plugin) PluginInfo() (*base.PluginInfo, error)
PluginInfo returns plugin information
func (*Plugin) ScaleDown ¶
func (p *Plugin) ScaleDown(ctx context.Context, blueprint instance.Server, n int64, config map[string]string) error
ScaleDown scales down the server pool by `n` servers
Click to show internal directories.
Click to hide internal directories.