entity

package
v0.0.0-...-f6c6508 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd []string

func (Cmd) String

func (c Cmd) String() string

type Container

type Container struct {
	ID         ContainerID
	Cmd        Cmd
	Entrypoint Entrypoint
	Created    time.Time
	Name       string
	State      string
	Status     string

	Image    *Image
	Ports    []PortMapping
	Labels   map[string]string
	Volumes  []Volume
	Networks []Network
}

type ContainerID

type ContainerID string

type Entrypoint

type Entrypoint []string

func (Entrypoint) String

func (e Entrypoint) String() string

type Image

type Image struct {
	ID   string
	Name string
	Tag  string

	Architecture string
	Author       string
	Cmd          []string
	Digest       string
	Entrypoint   []string
	Env          []map[string]string
	ExposedPorts []string
	DomainName   string
	Hostname     string
	Labels       []map[string]string
	OS           string
	Size         uint64
	User         string
	Volumes      []string
	WorkingDir   string
}

func (Image) String

func (i Image) String() string

type Network

type Network struct {
	ID        string
	Name      string
	Gateway   string
	IPAddress string

	Links   []string
	Aliases []string
}

func (Network) String

func (n Network) String() string

type PortMapping

type PortMapping struct {
	IP            string
	ContainerPort uint16
	HostPort      uint16
	Protocol      string
}

func (PortMapping) String

func (p PortMapping) String() string

type Stat

type Stat struct {
	ContainerID   ContainerID `json:"containerId"`
	CPUPercent    float64     `json:"cpuPercent"`
	MemoryPercent float64     `json:"memoryPercent"`
	MemoryUsage   uint64      `json:"memoryUsage"`
	MemoryTotal   uint64      `json:"memoryTotal"`
	NetworkInput  uint64      `json:"networkInput"`
	NetworkOutput uint64      `json:"networkOutput"`
	BlockRead     uint64      `json:"blockRead"`
	BlockWrite    uint64      `json:"blockWrite"`
}

type Volume

type Volume struct {
	Name        string
	Type        string
	Source      string
	Destination string
	Mode        string
	ReadWrite   bool
}

func (Volume) String

func (v Volume) String() string

formats a volume struct into a format similar to the one used in Docker Compose

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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