mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
correct some nits in comment and test files
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
bf0077c138
commit
52637848a7
8 changed files with 13 additions and 13 deletions
|
@ -29,7 +29,7 @@ type Flag struct {
|
||||||
Value string
|
Value string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewBFlags return the new BFlags struct
|
// NewBFlags returns the new BFlags struct
|
||||||
func NewBFlags() *BFlags {
|
func NewBFlags() *BFlags {
|
||||||
return &BFlags{
|
return &BFlags{
|
||||||
flags: make(map[string]*Flag),
|
flags: make(map[string]*Flag),
|
||||||
|
|
|
@ -37,7 +37,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if heartbeat != 10*time.Second {
|
if heartbeat != 10*time.Second {
|
||||||
t.Fatalf("Heatbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat)
|
t.Fatalf("Heartbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ttl != 20*time.Second {
|
if ttl != 20*time.Second {
|
||||||
|
@ -51,7 +51,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if heartbeat != 10*time.Second {
|
if heartbeat != 10*time.Second {
|
||||||
t.Fatalf("Heatbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat)
|
t.Fatalf("Heartbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat)
|
||||||
}
|
}
|
||||||
|
|
||||||
expected := 10 * defaultDiscoveryTTLFactor * time.Second
|
expected := 10 * defaultDiscoveryTTLFactor * time.Second
|
||||||
|
@ -71,7 +71,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
||||||
|
|
||||||
expected = 30 * time.Second / defaultDiscoveryTTLFactor
|
expected = 30 * time.Second / defaultDiscoveryTTLFactor
|
||||||
if heartbeat != expected {
|
if heartbeat != expected {
|
||||||
t.Fatalf("Heatbeat - Expected : %v, Actual : %v", expected, heartbeat)
|
t.Fatalf("Heartbeat - Expected : %v, Actual : %v", expected, heartbeat)
|
||||||
}
|
}
|
||||||
|
|
||||||
clusterOpts = map[string]string{}
|
clusterOpts = map[string]string{}
|
||||||
|
@ -81,7 +81,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if heartbeat != defaultDiscoveryHeartbeat {
|
if heartbeat != defaultDiscoveryHeartbeat {
|
||||||
t.Fatalf("Heatbeat - Expected : %v, Actual : %v", defaultDiscoveryHeartbeat, heartbeat)
|
t.Fatalf("Heartbeat - Expected : %v, Actual : %v", defaultDiscoveryHeartbeat, heartbeat)
|
||||||
}
|
}
|
||||||
|
|
||||||
expected = defaultDiscoveryHeartbeat * defaultDiscoveryTTLFactor
|
expected = defaultDiscoveryHeartbeat * defaultDiscoveryTTLFactor
|
||||||
|
|
|
@ -44,7 +44,7 @@ type StateInfo struct {
|
||||||
// Stats contains a stats properties from containerd.
|
// Stats contains a stats properties from containerd.
|
||||||
type Stats containerd.StatsResponse
|
type Stats containerd.StatsResponse
|
||||||
|
|
||||||
// Summary container a container summary from containerd
|
// Summary contains a container summary from containerd
|
||||||
type Summary struct{}
|
type Summary struct{}
|
||||||
|
|
||||||
// User specifies linux specific user and group information for the container's
|
// User specifies linux specific user and group information for the container's
|
||||||
|
|
|
@ -20,7 +20,7 @@ type Process struct {
|
||||||
// Stats contains a stats properties from containerd.
|
// Stats contains a stats properties from containerd.
|
||||||
type Stats struct{}
|
type Stats struct{}
|
||||||
|
|
||||||
// Summary container a container summary from containerd
|
// Summary contains a container summary from containerd
|
||||||
type Summary struct{}
|
type Summary struct{}
|
||||||
|
|
||||||
// StateInfo contains description about the new state container has entered.
|
// StateInfo contains description about the new state container has entered.
|
||||||
|
|
|
@ -11,7 +11,7 @@ type Process windowsoci.Process
|
||||||
// User specifies user information for the containers main process.
|
// User specifies user information for the containers main process.
|
||||||
type User windowsoci.User
|
type User windowsoci.User
|
||||||
|
|
||||||
// Summary container a container summary from containerd
|
// Summary contains a container summary from containerd
|
||||||
type Summary struct {
|
type Summary struct {
|
||||||
Pid uint32
|
Pid uint32
|
||||||
Command string
|
Command string
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// setupEnvironmentVariables convert a string array of environment variables
|
// setupEnvironmentVariables converts a string array of environment variables
|
||||||
// into a map as required by the HCS. Source array is in format [v1=k1] [v2=k2] etc.
|
// into a map as required by the HCS. Source array is in format [v1=k1] [v2=k2] etc.
|
||||||
func setupEnvironmentVariables(a []string) map[string]string {
|
func setupEnvironmentVariables(a []string) map[string]string {
|
||||||
r := make(map[string]string)
|
r := make(map[string]string)
|
||||||
|
|
|
@ -29,13 +29,13 @@ type Spec struct {
|
||||||
Root Root `json:"root"`
|
Root Root `json:"root"`
|
||||||
// Hostname is the container's host name.
|
// Hostname is the container's host name.
|
||||||
Hostname string `json:"hostname,omitempty"`
|
Hostname string `json:"hostname,omitempty"`
|
||||||
// Mounts profile configuration for adding mounts to the container's filesystem.
|
// Mounts profiles configuration for adding mounts to the container's filesystem.
|
||||||
Mounts []Mount `json:"mounts"`
|
Mounts []Mount `json:"mounts"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Windows contains platform specific configuration for Windows based containers.
|
// Windows contains platform specific configuration for Windows based containers.
|
||||||
type Windows struct {
|
type Windows struct {
|
||||||
// Resources contain information for handling resource constraints for the container
|
// Resources contains information for handling resource constraints for the container
|
||||||
Resources *Resources `json:"resources,omitempty"`
|
Resources *Resources `json:"resources,omitempty"`
|
||||||
// Networking contains the platform specific network settings for the container.
|
// Networking contains the platform specific network settings for the container.
|
||||||
Networking *Networking `json:"networking,omitempty"`
|
Networking *Networking `json:"networking,omitempty"`
|
||||||
|
@ -143,7 +143,7 @@ type CPU struct {
|
||||||
Percent *int64 `json:"percent,omitempty"`
|
Percent *int64 `json:"percent,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Network network resource management information
|
// Network contains network resource management information
|
||||||
type Network struct {
|
type Network struct {
|
||||||
// Bandwidth is the maximum egress bandwidth in bytes per second
|
// Bandwidth is the maximum egress bandwidth in bytes per second
|
||||||
Bandwidth *uint64 `json:"bandwidth,omitempty"`
|
Bandwidth *uint64 `json:"bandwidth,omitempty"`
|
||||||
|
|
Loading…
Add table
Reference in a new issue