mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-24 13:49:04 +00:00
- The tools directory ideally should not contain source code - Removes double vendoring of packagages - Makes it easer to hook the build into the top-level Makefile Eventually, the plugin should be moved to the infrakit repo. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
26 lines
639 B
Go
26 lines
639 B
Go
package rpc
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/docker/infrakit/pkg/spi"
|
|
)
|
|
|
|
// ImplementsRequest is the rpc wrapper for the Implements method args.
|
|
type ImplementsRequest struct {
|
|
}
|
|
|
|
// ImplementsResponse is the rpc wrapper for the Implements return value.
|
|
type ImplementsResponse struct {
|
|
APIs []spi.InterfaceSpec
|
|
}
|
|
|
|
// Handshake is a simple RPC object for doing handshake
|
|
type Handshake []spi.InterfaceSpec
|
|
|
|
// Implements responds to a request for the supported plugin interfaces.
|
|
func (h Handshake) Implements(_ *http.Request, req *ImplementsRequest, resp *ImplementsResponse) error {
|
|
resp.APIs = []spi.InterfaceSpec(h)
|
|
return nil
|
|
}
|