Documentation
¶
Index ¶
- Constants
- Variables
- func CreatedToStr(duration int64) string
- func DefineCreateDefaults(opts *entities.ContainerCreateOptions)
- func GetJSONOutput(v interface{}) (string, error)
- func PortsToString(ports []types.PortMapping) string
- func PrintJSON(data []interface{}) (string, error)
- func SizeToStr(size int64) string
Constants ¶
View Source
const (
// DefaultContainerDetachKeys container's default attach keys string.
DefaultContainerDetachKeys = "ctrl-p,ctrl-q"
)
Variables ¶
View Source
var ( // ErrEmptyVolDest empty volume destination error. ErrEmptyVolDest = errors.New("volume destination cannot be empty") // ErrTopPodNotRunning top error while pod not running. ErrTopPodNotRunning = errors.New("pods top can only be used on running pods") // ErrInvalidIPAddress invalid IP address error. ErrInvalidIPAddress = errors.New("invalid IP address") // ErrInvalidDNSAddress invalid DNS server address error. ErrInvalidDNSAddress = errors.New("invalid DNS address") )
Functions ¶
func CreatedToStr ¶
CreatedToStr converts duration to human readable format.
func DefineCreateDefaults ¶ added in v0.9.0
func DefineCreateDefaults(opts *entities.ContainerCreateOptions)
DefineCreateDefaults sets default container create options.
func GetJSONOutput ¶
GetJSONOutput converts interface to json output.
func PortsToString ¶
func PortsToString(ports []types.PortMapping) string
PortsToString converts the ports used to a string of the from "port1, port2" and also groups a continuous list of ports into a readable format. The format is IP:HostPort(-Range)->ContainerPort(-Range)/Proto.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.