Documentation
¶
Index ¶
- func Adapt(name plugin.Name, rpcClient rpc_client.Client) metadata.Plugin
- func AdaptUpdatable(name plugin.Name, rpcClient rpc_client.Client) metadata.Updatable
- func FromHandshaker(name plugin.Name, handshaker rpc.Handshaker) (metadata.Plugin, error)
- func NewClient(name plugin.Name, socketPath string) (metadata.Plugin, error)
- func NewClientUpdatable(name plugin.Name, socketPath string) (metadata.Updatable, error)
- type ChangesRequest
- type ChangesResponse
- type CommitRequest
- type CommitResponse
- type GetRequest
- type GetResponse
- type ListRequest
- type ListResponse
- type Metadata
- func (p *Metadata) Get(_ *http.Request, req *GetRequest, resp *GetResponse) error
- func (p *Metadata) ImplementedInterface() spi.InterfaceSpec
- func (p *Metadata) List(_ *http.Request, req *ListRequest, resp *ListResponse) error
- func (p *Metadata) Types() []string
- func (p *Metadata) VendorInfo() *spi.VendorInfo
- type Updatable
- func (u *Updatable) Changes(_ *http.Request, req *ChangesRequest, resp *ChangesResponse) error
- func (u *Updatable) Commit(_ *http.Request, req *CommitRequest, resp *CommitResponse) error
- func (u *Updatable) Get(_ *http.Request, req *GetRequest, resp *GetResponse) error
- func (u *Updatable) ImplementedInterface() spi.InterfaceSpec
- func (u *Updatable) List(_ *http.Request, req *ListRequest, resp *ListResponse) error
- func (u *Updatable) Types() []string
- func (u *Updatable) VendorInfo() *spi.VendorInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdaptUpdatable ¶
AdaptUpdatable converts a rpc client to a Metadata plugin object
func FromHandshaker ¶
FromHandshaker returns a Plugin client. If the backend implements the Updatable interface, this can be type casted to metadata.Updatable
Types ¶
type ChangesRequest ¶
ChangesRequest is the rpc wrapper of the params to Changes
type ChangesResponse ¶
ChangesResponse is the rpc wrapper of the params to Changes
type CommitRequest ¶
CommitRequest is the rpc wrapper of the params to Commit
type CommitResponse ¶
CommitResponse is the rpc wrapper of the params to Commit
type GetRequest ¶
GetRequest is the rpc wrapper of the params to Get
type GetResponse ¶
GetResponse is the rpc wrapper of the result of Get
type ListRequest ¶
ListRequest is the rpc wrapper for request parameters to List
type ListResponse ¶
ListResponse is the rpc wrapper for the results of List
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata the exported type needed to conform to json-rpc call convention
func ServerWithNames ¶
ServerWithNames which supports namespaced plugins
func (*Metadata) Get ¶
func (p *Metadata) Get(_ *http.Request, req *GetRequest, resp *GetResponse) error
Get retrieves the value at path given.
func (*Metadata) ImplementedInterface ¶
func (p *Metadata) ImplementedInterface() spi.InterfaceSpec
ImplementedInterface returns the interface implemented by this RPC service.
func (*Metadata) List ¶
func (p *Metadata) List(_ *http.Request, req *ListRequest, resp *ListResponse) error
List returns a list of child nodes given a path.
func (*Metadata) VendorInfo ¶
func (p *Metadata) VendorInfo() *spi.VendorInfo
VendorInfo returns a metadata object about the plugin, if the plugin implements it. See spi.Vendor
type Updatable ¶
type Updatable struct {
// contains filtered or unexported fields
}
Updatable is a rpc object with methods that are exported as JSON RPC service methods
func UpdatableServer ¶
UpdatableServer returns a Metadata that conforms to the net/rpc rpc call convention.
func UpdatableServerWithNames ¶
UpdatableServerWithNames returns a Metadata that conforms to the net/rpc rpc call convention.
func (*Updatable) Changes ¶
func (u *Updatable) Changes(_ *http.Request, req *ChangesRequest, resp *ChangesResponse) error
Changes sends a batch of changes to get a proposed view and cas
func (*Updatable) Commit ¶
func (u *Updatable) Commit(_ *http.Request, req *CommitRequest, resp *CommitResponse) error
Commit commits the changes
func (*Updatable) Get ¶
func (u *Updatable) Get(_ *http.Request, req *GetRequest, resp *GetResponse) error
Get retrieves the value at path given.
func (*Updatable) ImplementedInterface ¶
func (u *Updatable) ImplementedInterface() spi.InterfaceSpec
ImplementedInterface returns the interface implemented by this RPC service.
func (*Updatable) List ¶
func (u *Updatable) List(_ *http.Request, req *ListRequest, resp *ListResponse) error
List returns a list of child nodes given a path.
func (*Updatable) VendorInfo ¶
func (u *Updatable) VendorInfo() *spi.VendorInfo
VendorInfo returns a metadata object about the plugin, if the plugin implements it. See spi.Vendor