Documentation
¶
Index ¶
- func NewClient(socketPath string) flavor.Plugin
- type DrainRequest
- type DrainResponse
- type Flavor
- func (p *Flavor) Drain(_ *http.Request, req *DrainRequest, resp *DrainResponse) error
- func (p *Flavor) Healthy(_ *http.Request, req *HealthyRequest, resp *HealthyResponse) error
- func (p *Flavor) ImplementedInterface() spi.InterfaceSpec
- func (p *Flavor) Prepare(_ *http.Request, req *PrepareRequest, resp *PrepareResponse) error
- func (p *Flavor) Validate(_ *http.Request, req *ValidateRequest, resp *ValidateResponse) error
- type HealthyRequest
- type HealthyResponse
- type PrepareRequest
- type PrepareResponse
- type ValidateRequest
- type ValidateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DrainRequest ¶
type DrainRequest struct {
Properties *json.RawMessage
Instance instance.Description
}
DrainRequest is the rpc wrapper of the params to Drain
type DrainResponse ¶
type DrainResponse struct {
OK bool
}
DrainResponse is the rpc wrapper of the result of Drain
type Flavor ¶
type Flavor struct {
// contains filtered or unexported fields
}
Flavor the exported type needed to conform to json-rpc call convention
func PluginServer ¶
PluginServer returns a Flavor that conforms to the net/rpc rpc call convention.
func (*Flavor) Drain ¶
func (p *Flavor) Drain(_ *http.Request, req *DrainRequest, resp *DrainResponse) error
Drain drains the instance. It's the inverse of prepare before provision and happens before destroy.
func (*Flavor) Healthy ¶
func (p *Flavor) Healthy(_ *http.Request, req *HealthyRequest, resp *HealthyResponse) error
Healthy determines whether an instance is healthy.
func (*Flavor) ImplementedInterface ¶
func (p *Flavor) ImplementedInterface() spi.InterfaceSpec
ImplementedInterface returns the interface implemented by this RPC service.
func (*Flavor) Prepare ¶
func (p *Flavor) Prepare(_ *http.Request, req *PrepareRequest, resp *PrepareResponse) error
Prepare allows the Flavor to modify the provisioning instructions for an instance. For example, a helper could be used to place additional tags on the machine, or generate a specialized Init command based on the flavor configuration.
func (*Flavor) Validate ¶
func (p *Flavor) Validate(_ *http.Request, req *ValidateRequest, resp *ValidateResponse) error
Validate checks whether the helper can support a configuration.
type HealthyRequest ¶
type HealthyRequest struct {
Properties *json.RawMessage
Instance instance.Description
}
HealthyRequest is the rpc wrapper of the params to Healthy
type HealthyResponse ¶
HealthyResponse is the rpc wrapper of the result of Healthy
type PrepareRequest ¶
type PrepareRequest struct {
Properties *json.RawMessage
Spec instance.Spec
Allocation types.AllocationMethod
}
PrepareRequest is the rpc wrapper of the params to Prepare
type PrepareResponse ¶
PrepareResponse is the rpc wrapper of the result of Prepare
type ValidateRequest ¶
type ValidateRequest struct {
Properties *json.RawMessage
Allocation types.AllocationMethod
}
ValidateRequest is the rpc wrapper for request parameters to Validate
type ValidateResponse ¶
type ValidateResponse struct {
OK bool
}
ValidateResponse is the rpc wrapper for the results of Validate