Documentation ¶
Index ¶
- func Adapt(name plugin.Name, rpcClient rpc_client.Client) controller.Controller
- func NewClient(name plugin.Name, socketPath string) (controller.Controller, error)
- type ChangeRequest
- type ChangeResponse
- type Controller
- func (c *Controller) Commit(_ *http.Request, req *ChangeRequest, resp *ChangeResponse) error
- func (c *Controller) Describe(_ *http.Request, req *FindRequest, resp *FindResponse) error
- func (c *Controller) ExampleProperties() *types.Any
- func (c *Controller) Free(_ *http.Request, req *FindRequest, resp *FindResponse) error
- func (c *Controller) ImplementedInterface() spi.InterfaceSpec
- func (c *Controller) Plan(_ *http.Request, req *ChangeRequest, resp *ChangeResponse) error
- func (c *Controller) Types() []string
- func (c *Controller) VendorInfo() *spi.VendorInfo
- type FindRequest
- type FindResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Adapt ¶
func Adapt(name plugin.Name, rpcClient rpc_client.Client) controller.Controller
Adapt converts a rpc client to a Controller object
func NewClient ¶
func NewClient(name plugin.Name, socketPath string) (controller.Controller, error)
NewClient returns a plugin interface implementation connected to a remote plugin
Types ¶
type ChangeRequest ¶
ChangeRequest is the common request message for Plan and Commit
type ChangeResponse ¶
ChangeResponse is the common response message for Plan and Commit
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the exported type for json-rpc
func Server ¶
func Server(c controller.Controller) *Controller
Server returns a Controller that conforms to the net/rpc rpc call convention.
func ServerWithNames ¶
func ServerWithNames(subcontrollers func() (map[string]controller.Controller, error)) *Controller
ServerWithNames returns a Controller map
func (*Controller) Commit ¶
func (c *Controller) Commit(_ *http.Request, req *ChangeRequest, resp *ChangeResponse) error
Commit is the rpc method for Commit
func (*Controller) Describe ¶
func (c *Controller) Describe(_ *http.Request, req *FindRequest, resp *FindResponse) error
Describe is the rpc method for Describe
func (*Controller) ExampleProperties ¶
func (c *Controller) ExampleProperties() *types.Any
ExampleProperties returns an example properties used by the plugin
func (*Controller) Free ¶
func (c *Controller) Free(_ *http.Request, req *FindRequest, resp *FindResponse) error
Free is the rpc method for Free
func (*Controller) ImplementedInterface ¶
func (c *Controller) ImplementedInterface() spi.InterfaceSpec
ImplementedInterface returns the interface implemented by this RPC service.
func (*Controller) Plan ¶
func (c *Controller) Plan(_ *http.Request, req *ChangeRequest, resp *ChangeResponse) error
Plan is the rpc method for Plan
func (*Controller) Types ¶
func (c *Controller) Types() []string
Types returns the types exposed by this kind of RPC service
func (*Controller) VendorInfo ¶
func (c *Controller) VendorInfo() *spi.VendorInfo
VendorInfo returns a metadata object about the plugin, if the plugin implements it. See plugin.Vendor
type FindRequest ¶
FindRequest is the common request message for Describe and Free