Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginInfo ¶ added in v0.2.0
type PluginInfo struct {
// contains filtered or unexported fields
}
PluginInfo is the service object for the RPC metadata service
func NewPluginInfo ¶ added in v0.2.0
func NewPluginInfo(receiver interface{}) (*PluginInfo, error)
NewPluginInfo returns an instance of the metadata service
func (*PluginInfo) Register ¶ added in v0.2.0
func (m *PluginInfo) Register(receiver interface{}) error
Register registers an rpc-capable object for introspection and metadata service
func (*PluginInfo) ShowAPI ¶ added in v0.3.1
func (m *PluginInfo) ShowAPI(resp http.ResponseWriter, req *http.Request)
ShowAPI responds by returning information about the plugin.
func (*PluginInfo) ShowTemplateFunctions ¶ added in v0.3.1
func (m *PluginInfo) ShowTemplateFunctions(resp http.ResponseWriter, req *http.Request)
ShowTemplateFunctions responds by returning information about template functions the plugin expopses.
type Stoppable ¶
type Stoppable interface {
Stop()
AwaitStopped()
}
Stoppable support proactive stopping, and blocking until stopped.
func StartPluginAtPath ¶
func StartPluginAtPath(socketPath string, receiver VersionedInterface, more ...VersionedInterface) (Stoppable, error)
StartPluginAtPath starts an HTTP server listening on a unix socket at the specified path. Returns a Stoppable that can be used to stop or block on the server.
type TypedFunctionExporter ¶ added in v0.3.1
type TypedFunctionExporter interface {
// Types returns a list of types in this plugin
Types() []string
// FuncsByType returns the template functions exported by each typed plugin
FuncsByType(string) []template.Function
}
TypedFunctionExporter is an interface implemented by plugins that supports multiple types in a single RPC endpoint. Each typed plugin can export some functions and this interface provides metadata about them.
type VersionedInterface ¶
type VersionedInterface interface {
// ImplementedInterface returns the interface being provided.
ImplementedInterface() spi.InterfaceSpec
}
A VersionedInterface identifies which Interfaces a plugin supports.