dockerplugin: go.pedge.io/dockerplugin Index | Files

package dockerplugin

import "go.pedge.io/dockerplugin"

Package dockerplugin is a library taking care of the generic code for docker plugins written in go.

Index

Package Files

api_server.go dockerplugin.go dockerplugin.pb.go dockerplugin.pb.gw.go server.go tcp_listener.go unix_listener.go

Constants

const (
    // DefaultGRPCPort is the default port used for grpc.
    DefaultGRPCPort uint16 = 2150
)

func RegisterAPIHandler Uses

func RegisterAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAPIHandler registers the http handlers for service API to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAPIHandlerFromEndpoint Uses

func RegisterAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAPIHandlerFromEndpoint is same as RegisterAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAPIServer Uses

func RegisterAPIServer(s *grpc.Server, srv APIServer)

type APIClient Uses

type APIClient interface {
    // Activate is the activate function call for the docker plugin API.
    Activate(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*ActivateResponse, error)
}

func NewAPIClient Uses

func NewAPIClient(cc *grpc.ClientConn) APIClient

type APIServer Uses

type APIServer interface {
    // Activate is the activate function call for the docker plugin API.
    Activate(context.Context, *google_protobuf1.Empty) (*ActivateResponse, error)
}

type ActivateResponse Uses

type ActivateResponse struct {
    Implements []string `protobuf:"bytes,1,rep,name=implements" json:"implements,omitempty"`
}

ActivateResponse is a response for the docker plugin API activate function call.

func (*ActivateResponse) Descriptor Uses

func (*ActivateResponse) Descriptor() ([]byte, []int)

func (*ActivateResponse) ProtoMessage Uses

func (*ActivateResponse) ProtoMessage()

func (*ActivateResponse) Reset Uses

func (m *ActivateResponse) Reset()

func (*ActivateResponse) String Uses

func (m *ActivateResponse) String() string

type Server Uses

type Server interface {
    Serve() error
}

Server serves a VolumeDriver.

func NewTCPServer Uses

func NewTCPServer(
    driverName string,
    implements []string,
    registerFunc func(*grpc.Server),
    httpRegisterFunc func(context.Context, *runtime.ServeMux, *grpc.ClientConn) error,
    address string,
    opts ServerOptions,
) Server

NewTCPServer returns a new Server for TCP.

func NewUnixServer Uses

func NewUnixServer(
    driverName string,
    implements []string,
    registerFunc func(*grpc.Server),
    httpRegisterFunc func(context.Context, *runtime.ServeMux, *grpc.ClientConn) error,
    group string,
    opts ServerOptions,
) Server

NewUnixServer returns a new Server for Unix sockets.

type ServerOptions Uses

type ServerOptions struct {
    GRPCPort uint16
}

ServerOptions are options for a Server.

Package dockerplugin imports 23 packages (graph) and is imported by 2 packages. Updated 2016-07-25. Refresh now. Tools for package owners.