Documentation ¶
Index ¶
- func NewClient(name plugin.Name, socketPath string) (instance.Plugin, error)
- type DescribeInstancesRequest
- type DescribeInstancesResponse
- type DestroyRequest
- type DestroyResponse
- type Instance
- func (p *Instance) DescribeInstances(_ *http.Request, req *DescribeInstancesRequest, ...) error
- func (p *Instance) Destroy(_ *http.Request, req *DestroyRequest, resp *DestroyResponse) error
- func (p *Instance) ImplementedInterface() spi.InterfaceSpec
- func (p *Instance) Label(_ *http.Request, req *LabelRequest, resp *LabelResponse) error
- func (p *Instance) Provision(_ *http.Request, req *ProvisionRequest, resp *ProvisionResponse) error
- func (p *Instance) SetExampleProperties(request interface{})
- func (p *Instance) Validate(_ *http.Request, req *ValidateRequest, resp *ValidateResponse) error
- func (p *Instance) VendorInfo() *spi.VendorInfo
- type LabelRequest
- type LabelResponse
- type ProvisionRequest
- type ProvisionResponse
- type ValidateRequest
- type ValidateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DescribeInstancesRequest ¶
DescribeInstancesRequest is the rpc wrapper for DescribeInstances request
type DescribeInstancesResponse ¶
type DescribeInstancesResponse struct { Type string Descriptions []instance.Description }
DescribeInstancesResponse is the rpc wrapper for the DescribeInstances response
type DestroyRequest ¶
DestroyRequest is the rpc wrapper for Destroy request
type DestroyResponse ¶
DestroyResponse is the rpc wrapper for Destroy response
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance is the JSON RPC service representing the Instance Plugin. It must be exported in order to be registered by the rpc server package.
func PluginServer ¶
PluginServer returns a RPCService that conforms to the net/rpc rpc call convention.
func PluginServerWithTypes ¶ added in v0.2.0
PluginServerWithTypes which supports multiple types of instance plugins. The de-multiplexing is done by the server's RPC method implementations.
func (*Instance) DescribeInstances ¶
func (p *Instance) DescribeInstances(_ *http.Request, req *DescribeInstancesRequest, resp *DescribeInstancesResponse) error
DescribeInstances returns descriptions of all instances matching all of the provided tags.
func (*Instance) Destroy ¶
func (p *Instance) Destroy(_ *http.Request, req *DestroyRequest, resp *DestroyResponse) error
Destroy terminates an existing instance.
func (*Instance) ImplementedInterface ¶
func (p *Instance) ImplementedInterface() spi.InterfaceSpec
ImplementedInterface returns the interface implemented by this RPC service.
func (*Instance) Label ¶ added in v0.3.0
func (p *Instance) Label(_ *http.Request, req *LabelRequest, resp *LabelResponse) error
Label labels the instance
func (*Instance) Provision ¶
func (p *Instance) Provision(_ *http.Request, req *ProvisionRequest, resp *ProvisionResponse) error
Provision creates a new instance based on the spec.
func (*Instance) SetExampleProperties ¶ added in v0.2.0
func (p *Instance) SetExampleProperties(request interface{})
SetExampleProperties sets the rpc request with any example properties/ custom type
func (*Instance) Validate ¶
func (p *Instance) Validate(_ *http.Request, req *ValidateRequest, resp *ValidateResponse) error
Validate performs local validation on a provision request.
func (*Instance) VendorInfo ¶ added in v0.2.0
func (p *Instance) VendorInfo() *spi.VendorInfo
VendorInfo returns a metadata object about the plugin, if the plugin implements it.
type LabelRequest ¶ added in v0.3.0
LabelRequest is the rpc wrapper for Label request
type LabelResponse ¶ added in v0.3.0
LabelResponse is the rpc wrapper for Label response
type ProvisionRequest ¶
ProvisionRequest is the rpc wrapper for Provision request
type ProvisionResponse ¶
ProvisionResponse is the rpc wrapper for Provision response
type ValidateRequest ¶
ValidateRequest is the rpc wrapper for the Validate method args
type ValidateResponse ¶
ValidateResponse is the rpc wrapper for the Validate response values