router

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoutes

func AddRoutes(r *mux.Router, b *Backend)

Types

type Backend

type Backend struct {
	StateDir string
	ChildPID int
	// NetworkDriver can be nil
	NetworkDriver NetworkDriver
	// PortDriver MUST be thread-safe.
	// PortDriver can be nil
	PortDriver PortDriver
}

func (*Backend) DeletePort

func (b *Backend) DeletePort(w http.ResponseWriter, r *http.Request)

DeletePort is the handler for POST /v{N}/ports/{id}

func (*Backend) GetInfo

func (b *Backend) GetInfo(w http.ResponseWriter, r *http.Request)

func (*Backend) GetPorts

func (b *Backend) GetPorts(w http.ResponseWriter, r *http.Request)

GetPorts is handler for GET /v{N}/ports

func (*Backend) PostPort

func (b *Backend) PostPort(w http.ResponseWriter, r *http.Request)

PostPort is the handler for POST /v{N}/ports

type NetworkDriver

type NetworkDriver interface {
	Info(context.Context) (*api.NetworkDriverInfo, error)
}

NetworkDriver is implemented by network.ParentDriver

type PortDriver

type PortDriver interface {
	Info(context.Context) (*api.PortDriverInfo, error)
	port.Manager
}

PortDriver is implemented by port.ParentDriver

Jump to

Keyboard shortcuts

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