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
|
||||
}
|
||||
|
||||
// NewBFlags return the new BFlags struct
|
||||
// NewBFlags returns the new BFlags struct
|
||||
func NewBFlags() *BFlags {
|
||||
return &BFlags{
|
||||
flags: make(map[string]*Flag),
|
||||
|
|
|
@ -37,7 +37,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
|||
}
|
||||
|
||||
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 {
|
||||
|
@ -51,7 +51,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
|||
}
|
||||
|
||||
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
|
||||
|
@ -71,7 +71,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
|||
|
||||
expected = 30 * time.Second / defaultDiscoveryTTLFactor
|
||||
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{}
|
||||
|
@ -81,7 +81,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
|||
}
|
||||
|
||||
if heartbeat != defaultDiscoveryHeartbeat {
|
||||
t.Fatalf("Heatbeat - Expected : %v, Actual : %v", defaultDiscoveryHeartbeat, heartbeat)
|
||||
t.Fatalf("Heartbeat - Expected : %v, Actual : %v", defaultDiscoveryHeartbeat, heartbeat)
|
||||
}
|
||||
|
||||
expected = defaultDiscoveryHeartbeat * defaultDiscoveryTTLFactor
|
||||
|
|
|
@ -44,7 +44,7 @@ type StateInfo struct {
|
|||
// Stats contains a stats properties from containerd.
|
||||
type Stats containerd.StatsResponse
|
||||
|
||||
// Summary container a container summary from containerd
|
||||
// Summary contains a container summary from containerd
|
||||
type Summary struct{}
|
||||
|
||||
// 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.
|
||||
type Stats struct{}
|
||||
|
||||
// Summary container a container summary from containerd
|
||||
// Summary contains a container summary from containerd
|
||||
type Summary struct{}
|
||||
|
||||
// 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.
|
||||
type User windowsoci.User
|
||||
|
||||
// Summary container a container summary from containerd
|
||||
// Summary contains a container summary from containerd
|
||||
type Summary struct {
|
||||
Pid uint32
|
||||
Command string
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"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.
|
||||
func setupEnvironmentVariables(a []string) map[string]string {
|
||||
r := make(map[string]string)
|
||||
|
|
|
@ -29,13 +29,13 @@ type Spec struct {
|
|||
Root Root `json:"root"`
|
||||
// Hostname is the container's host name.
|
||||
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"`
|
||||
}
|
||||
|
||||
// Windows contains platform specific configuration for Windows based containers.
|
||||
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"`
|
||||
// Networking contains the platform specific network settings for the container.
|
||||
Networking *Networking `json:"networking,omitempty"`
|
||||
|
@ -143,7 +143,7 @@ type CPU struct {
|
|||
Percent *int64 `json:"percent,omitempty"`
|
||||
}
|
||||
|
||||
// Network network resource management information
|
||||
// Network contains network resource management information
|
||||
type Network struct {
|
||||
// Bandwidth is the maximum egress bandwidth in bytes per second
|
||||
Bandwidth *uint64 `json:"bandwidth,omitempty"`
|
||||
|
|
|
@ -136,7 +136,7 @@ func (o *NamedListOpts) Name() string {
|
|||
return o.name
|
||||
}
|
||||
|
||||
//MapOpts holds a map of values and a validation function.
|
||||
// MapOpts holds a map of values and a validation function.
|
||||
type MapOpts struct {
|
||||
values map[string]string
|
||||
validator ValidatorFctType
|
||||
|
|
Loading…
Reference in a new issue