Files
linuxkit/vendor/github.com/docker/infrakit/pkg/rpc/handshake.go
Rolf Neugebauer 48845bcfd9 infrakit: Move the hyperkit instance plugin into the source directory
- 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>
2017-03-25 13:02:45 +01:00

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
}