package router

import "github.com/rootless-containers/rootlesskit/pkg/api/router"

Index

Functions

func AddRoutes

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

Types

type Backend

type Backend struct {
	// PortDriver MUST be thread-safe.
	// PortDriver can be nil
	PortDriver port.ParentDriver
}

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) 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

Source Files

router.go

Version
v0.9.5
Published
May 11, 2020
Platform
linux/amd64
Imports
8 packages
Last checked
1 hour ago

Tools for package owners.