server

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: Apache-2.0 Imports: 17 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	// User is the user ID for our gRPC socket.
	User int
	// Group is the group ID for our gRPC socket.
	Group int
	// Mode is the permission mode bits for our gRPC socket.
	Mode os.FileMode
	// QualifyReqFn produces return context for disambiguating a CRI request/reply.
	QualifyReqFn func(interface{}) 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(criv1.ImageServiceServer) error
	// RegistersRuntimeService registers the provided runtime service with the server.
	RegisterRuntimeService(criv1.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()
	// Chmod changes the permissions of the server's socket.
	Chmod(mode os.FileMode) error
	// Chown changes ownership of the server's socket.
	Chown(uid, gid int) error
}

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