Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartPlugins ¶ added in v0.0.2
func StartPlugins() error
Types ¶
type DevicePlugin ¶ added in v0.0.2
type DevicePlugin struct { // Impl Injection Impl Device }
This is the implementation of plugin.Plugin so we can serve/consume this
This has two methods: Server must return an RPC server for this plugin type. We construct a GreeterRPCServer for this.
Client must return an implementation of our interface that communicates over an RPC client. We return GreeterRPC for this.
Ignore MuxBroker. That is used to create more multiplexed streams on our plugin connection and is a more advanced use case.
func (DevicePlugin) Client ¶ added in v0.0.2
func (DevicePlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*DevicePlugin) Server ¶ added in v0.0.2
func (p *DevicePlugin) Server(*plugin.MuxBroker) (interface{}, error)
type DeviceRPC ¶ added in v0.0.2
type DeviceRPC struct {
// contains filtered or unexported fields
}
Here is an implementation that talks over RPC
type DeviceRPCServer ¶ added in v0.0.2
type DeviceRPCServer struct { // This is the real implementation Impl Device }
Here is the RPC server that GreeterRPC talks to, conforming to the requirements of net/rpc
func (*DeviceRPCServer) Greet ¶ added in v0.0.2
func (s *DeviceRPCServer) Greet(args interface{}, resp *string) error
Click to show internal directories.
Click to hide internal directories.