server

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Overview

Package server serves the engine's Docker Engine API subset over HTTP.

Index

Constants

View Source
const DefaultMaxUploadBytes = 1 << 30

DefaultMaxUploadBytes bounds an image load or an archive upload when Info.MaxUploadBytes is not set.

Variables

View Source
var StatsInterval = time.Second

StatsInterval is how often a stats stream reads (Docker's: 1 s); tests shorten it.

Functions

func New

func New(d *daemon.Daemon, info Info) http.Handler

New returns the API handler for d.

func ParseEventTime added in v0.6.0

func ParseEventTime(s string, now time.Time) (time.Time, error)

ParseEventTime reads a since/until value as Docker does: Unix seconds (with an optional fraction), RFC 3339, or a Go duration counted back from now ("10m").

Types

type Info

type Info struct {
	Version   string
	GitCommit string
	// MaxUploadBytes bounds POST /images/load and PUT
	// /containers/{id}/archive bodies (default DefaultMaxUploadBytes);
	// every other request body is bounded at 1 MiB.
	MaxUploadBytes int64
}

Info is what /version reports about the build.

Jump to

Keyboard shortcuts

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