router

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts *Options) http.Handler

New creates a new router and registers the handlers to it. Returns a handler object The struct definitions of the HTTP responses come from https://github.com/moby/moby/tree/master/api/types.

func VersionMiddleware

func VersionMiddleware(next http.Handler) http.Handler

VersionMiddleware checks for the requested version of the api and makes sure it falls within the bounds of the supported version.

Types

type Options

type Options struct {
	Config              *config.Config
	ContainerService    container.Service
	ImageService        image.Service
	NetworkService      network.Service
	SystemService       system.Service
	BuilderService      builder.Service
	VolumeService       volume.Service
	ExecService         exec.Service
	DistributionService distribution.Service

	// NerdctlWrapper wraps the interactions with nerdctl to build
	NerdctlWrapper *backend.NerdctlWrapper
}

Options defines the router options to be passed into the handlers.

Jump to

Keyboard shortcuts

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