docker: github.com/docker/docker/api/server/router Index | Files | Directories

package router

import "github.com/docker/docker/api/server/router"

Index

Package Files

experimental.go local.go router.go

type ExperimentalRoute Uses

type ExperimentalRoute interface {
    Route

    Enable()
    Disable()
}

ExperimentalRoute defines an experimental API route that can be enabled or disabled.

type Route Uses

type Route interface {
    // Handler returns the raw function to create the http handler.
    Handler() httputils.APIFunc
    // Method returns the http method that the route responds to.
    Method() string
    // Path returns the subpath where the route responds to.
    Path() string
}

Route defines an individual API route in the docker server.

func Experimental Uses

func Experimental(r Route) Route

Experimental will mark a route as experimental.

func NewDeleteRoute Uses

func NewDeleteRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route

NewDeleteRoute initializes a new route with the http method DELETE.

func NewGetRoute Uses

func NewGetRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route

NewGetRoute initializes a new route with the http method GET.

func NewHeadRoute Uses

func NewHeadRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route

NewHeadRoute initializes a new route with the http method HEAD.

func NewOptionsRoute Uses

func NewOptionsRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route

NewOptionsRoute initializes a new route with the http method OPTIONS.

func NewPostRoute Uses

func NewPostRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route

NewPostRoute initializes a new route with the http method POST.

func NewPutRoute Uses

func NewPutRoute(path string, handler httputils.APIFunc, opts ...RouteWrapper) Route

NewPutRoute initializes a new route with the http method PUT.

func NewRoute Uses

func NewRoute(method, path string, handler httputils.APIFunc, opts ...RouteWrapper) Route

NewRoute initializes a new local route for the router.

type RouteWrapper Uses

type RouteWrapper func(r Route) Route

RouteWrapper wraps a route with extra functionality. It is passed in when creating a new route.

type Router Uses

type Router interface {
    // Routes returns the list of routes to add to the docker server.
    Routes() []Route
}

Router defines an interface to specify a group of routes to add to the docker server.

Directories

PathSynopsis
build
checkpoint
container
debug
distribution
grpc
image
network
plugin
session
swarm
system
volume

Package router imports 3 packages (graph) and is imported by 3535 packages. Updated 2020-08-06. Refresh now. Tools for package owners.