internal

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 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 Options added in v1.5.0

type Options struct {
	// KillSignals is a whitespace separated list of signals permitted for container kill.
	KillSignals string
	AllowPulls  bool
	AllowPrune  bool
	AllowExec   bool
	AllowCreate bool
	AllowAll    bool
}

type Proxy

type Proxy struct {
	Options
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(opts Options, realSock string, transport http.RoundTripper) *Proxy

NewProxy creates a proxy to the docker socket at realSock; transport overrides the socket connection if not nil.

func (*Proxy) AccessDenied

func (p *Proxy) AccessDenied(writer http.ResponseWriter, request *http.Request)

func (*Proxy) ContainerKill

func (p *Proxy) ContainerKill(writer http.ResponseWriter, request *http.Request)

func (*Proxy) Guard added in v1.5.0

func (p *Proxy) Guard(allowed bool) http.HandlerFunc

Guard returns a handler that streams the request to the socket if allowed (or AllowAll is set), otherwise denies it.

func (*Proxy) PassToSocket

func (p *Proxy) PassToSocket(writer http.ResponseWriter, request *http.Request)

func (*Proxy) Stream added in v1.5.0

func (p *Proxy) Stream(writer http.ResponseWriter, request *http.Request)

Stream forwards the request with the server read and write timeouts removed, for long-running requests.

type Server added in v1.1.0

type Server struct {
	// contains filtered or unexported fields
}

func NewServer added in v1.1.0

func NewServer(p *Proxy, port int) *Server

func (*Server) Run added in v1.5.0

func (s *Server) Run(ctx context.Context) error

Run serves until ctx is cancelled, then shuts down gracefully.

Jump to

Keyboard shortcuts

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