httpserver

package
v0.0.0-...-6c13684 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessCreateContainer

func ProcessCreateContainer(req *http.Request) []byte

ProcessCreateContainer handles a new http request to create a new container

Types

type RunOpts

type RunOpts struct {
	Hostname        string              `json:"Hostname"`
	Domainname      string              `json:"Domainname"`
	User            string              `json:"User"`
	AttachStdin     bool                `json:"AttachStdin"`
	AttachStdout    bool                `json:"AttachStdout"`
	AttachStderr    bool                `json:"AttachStderr"`
	Tty             bool                `json:"Tty"`
	OpenStdin       bool                `json:"OpenStdin"`
	StdinOnce       bool                `json:"StdinOnce"`
	Env             []string            `json:"Env"`
	Cmd             []string            `json:"Cmd"`
	Entrypoint      string              `json:"Entrypoint,omitempty"`
	Image           string              `json:"Image"`
	Labels          map[string]string   `json:"Labels"`
	Volumes         map[string]struct{} `json:"Volumes"`
	WorkingDir      string              `json:"WorkingDir"`
	NetworkDisabled bool                `json:"NetworkDisabled"`
	MacAddress      string              `json:"MacAddress"`
	ExposedPorts    map[string]struct{} `json:"ExposedPorts"`
	StopSignal      string              `json:"StopSignal"`
	StopTimeout     int                 `json:"StopTimeout"`
	HostConfig      struct {
		Binds              []string `json:"Binds"`
		Links              []string `json:"Links"`
		Memory             int      `json:"Memory"`
		MemorySwap         int      `json:"MemorySwap"`
		MemoryReservation  int      `json:"MemoryReservation"`
		KernelMemory       int      `json:"KernelMemory"`
		NanoCPUs           int      `json:"NanoCPUs"`
		CPUPercent         int      `json:"CpuPercent"`
		CPUShares          int      `json:"CpuShares"`
		CPUPeriod          int      `json:"CpuPeriod"`
		CPURealtimePeriod  int      `json:"CpuRealtimePeriod"`
		CPURealtimeRuntime int      `json:"CpuRealtimeRuntime"`
		CPUQuota           int      `json:"CpuQuota"`
		CpusetCpus         string   `json:"CpusetCpus"`
		CpusetMems         string   `json:"CpusetMems"`
		MaximumIOps        int      `json:"MaximumIOps"`
		MaximumIOBps       int      `json:"MaximumIOBps"`
		BlkioWeight        int      `json:"BlkioWeight"`
		BlkioWeightDevice  []struct {
			Path   string `json:"Path"`
			Weight int    `json:"Weight"`
		} `json:"BlkioWeightDevice"`
		BlkioDeviceReadBps []struct {
			Path string `json:"Path"`
			Rate int    `json:"Rate"`
		} `json:"BlkioDeviceReadBps"`
		BlkioDeviceReadIOps []struct {
			Path string `json:"Path"`
			Rate int    `json:"Rate"`
		} `json:"BlkioDeviceReadIOps"`
		BlkioDeviceWriteBps []struct {
			Path string `json:"Path"`
			Rate int    `json:"Rate"`
		} `json:"BlkioDeviceWriteBps"`
		BlkioDeviceWriteIOps []struct {
			Path string `json:"Path"`
			Rate int    `json:"Rate"`
		} `json:"BlkioDeviceWriteIOps"`
		DeviceRequests []struct {
			Driver       string            `json:"Driver"`
			Count        int               `json:"Count"`
			DeviceIDs    []string          `json:"DeviceIDs"`
			Capabilities [][]string        `json:"Capabilities"`
			Options      map[string]string `json:"Options"`
		} `json:"DeviceRequests"`
		MemorySwappiness int    `json:"MemorySwappiness"`
		OomKillDisable   bool   `json:"OomKillDisable"`
		OomScoreAdj      int    `json:"OomScoreAdj"`
		PidMode          string `json:"PidMode"`
		PidsLimit        int    `json:"PidsLimit"`
		PortBindings     map[string][]struct {
			HostIP   string `json:"HostIp"`
			HostPort string `json:"HostPort"`
		} `json:"PortBindings"`
		PublishAllPorts bool     `json:"PublishAllPorts"`
		Privileged      bool     `json:"Privileged"`
		ReadonlyRootfs  bool     `json:"ReadonlyRootfs"`
		DNS             []string `json:"Dns"`
		DNSOptions      []string `json:"DnsOptions"`
		DNSSearch       []string `json:"DnsSearch"`
		VolumesFrom     []string `json:"VolumesFrom"`
		CapAdd          []string `json:"CapAdd"`
		CapDrop         []string `json:"CapDrop"`
		GroupAdd        []string `json:"GroupAdd"`
		RestartPolicy   struct {
			Name              string `json:"Name"`
			MaximumRetryCount int    `json:"MaximumRetryCount"`
		} `json:"RestartPolicy"`
		AutoRemove  bool          `json:"AutoRemove"`
		NetworkMode string        `json:"NetworkMode"`
		Devices     []interface{} `json:"Devices"`
		Ulimits     []struct {
			Name string `json:"Name"`
			Soft int    `json:"Soft"`
			Hard int    `json:"Hard"`
		} `json:"Ulimits"`
		LogConfig struct {
			Type   string `json:"Type"`
			Config struct {
			} `json:"Config"`
		} `json:"LogConfig"`
		SecurityOpt  []string          `json:"SecurityOpt"`
		StorageOpt   map[string]string `json:"StorageOpt"`
		CgroupParent string            `json:"CgroupParent"`
		VolumeDriver string            `json:"VolumeDriver"`
		ShmSize      int               `json:"ShmSize"`
	} `json:"HostConfig"`
	NetworkingConfig struct {
		EndpointsConfig map[string]struct {
			IPAMConfig struct {
				IPv4Address  string   `json:"IPv4Address"`
				IPv6Address  string   `json:"IPv6Address"`
				LinkLocalIPs []string `json:"LinkLocalIPs"`
			} `json:"IPAMConfig"`
			Links               []string          `json:"Links"`
			Aliases             []string          `json:"Aliases"`
			NetworkID           string            `json:"NetworkID"`
			EndpointID          string            `json:"EndpointID"`
			Gateway             string            `json:"Gateway"`
			IPAdress            string            `json:"IPAdress"`
			IPPrefixLen         int               `json:"IPPrefixLen"`
			IPv6Gateway         string            `json:"IPv6Gateway"`
			GlobalIPv6Address   string            `json:"GlobalIPv6Address"`
			GlobalIPv6PrefixLen int64             `json:"GlobalIPv6PrefixLen"`
			MadAddress          string            `json:"MadAddress"`
			DriverOpts          map[string]string `json:"DriverOpts"`
		} `json:"EndpointsConfig"`
	} `json:"NetworkingConfig"`
}

RunOpts is the specification of the package of the Docker API

Jump to

Keyboard shortcuts

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