Documentation ¶
Index ¶
- func Adapt(rpcClient rpc_client.Client) metadata.Plugin
- func NewClient(socketPath string) (metadata.Plugin, error)
- type GetRequest
- type GetResponse
- type ListRequest
- type ListResponse
- type Metadata
- func (p *Metadata) Funcs() []template.Function
- func (p *Metadata) FuncsByType(t string) []template.Function
- 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
- func (p *Metadata) WithBase(m metadata.Plugin) *Metadata
- func (p *Metadata) WithTypes(typed map[string]metadata.Plugin) *Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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 ¶
type ListResponse struct {
Nodes []string
}
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 PluginServer ¶
PluginServer returns a Metadata that conforms to the net/rpc rpc call convention.
func PluginServerWithTypes ¶
PluginServerWithTypes which supports multiple types of metadata plugins. The de-multiplexing is done by the server's RPC method implementations.
func (*Metadata) Funcs ¶
Funcs implements the template.FunctionExporter method to expose help for plugin's template functions
func (*Metadata) FuncsByType ¶
FuncsByType implements server.TypedFunctionExporter
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