server

package
v0.2.1-0...-d3ae3b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler grpc.UnaryHandler

Handler is a CRI server generic request handler.

type Interceptor

type Interceptor func(context.Context, string, interface{}, Handler) (interface{}, error)

Interceptor is a hook that intercepts processing a request by a handler.

type Options

type Options struct {
	// Socket is the path of our gRPC servers unix-domain socket.
	Socket string
}

Options contains the configurable options of our CRI server.

type Server

type Server interface {
	// RegisterImageService registers the provided image service with the server.
	RegisterImageService(api.ImageServiceServer) error
	// RegistersRuntimeService registers the provided runtime service with the server.
	RegisterRuntimeService(api.RuntimeServiceServer) error
	// RegisterInterceptors registers the given interceptors with the server.
	RegisterInterceptors(map[string]Interceptor) error
	// Start starts the request processing loop (goroutine) of the server.
	Start() error
	// Stop stops the request processing loop (goroutine) of the server.
	Stop()
}

Server is the interface we expose for controlling our CRI server.

func NewServer

func NewServer(options Options) (Server, error)

NewServer creates a new server instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL