Signed-off-by: allencloud <allen.sun@daocloud.io>
| ... | ... |
@@ -37,7 +37,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
| 37 | 37 |
} |
| 38 | 38 |
|
| 39 | 39 |
if heartbeat != 10*time.Second {
|
| 40 |
- t.Fatalf("Heatbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat)
|
|
| 40 |
+ t.Fatalf("Heartbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat)
|
|
| 41 | 41 |
} |
| 42 | 42 |
|
| 43 | 43 |
if ttl != 20*time.Second {
|
| ... | ... |
@@ -51,7 +51,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
| 51 | 51 |
} |
| 52 | 52 |
|
| 53 | 53 |
if heartbeat != 10*time.Second {
|
| 54 |
- t.Fatalf("Heatbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat)
|
|
| 54 |
+ t.Fatalf("Heartbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat)
|
|
| 55 | 55 |
} |
| 56 | 56 |
|
| 57 | 57 |
expected := 10 * defaultDiscoveryTTLFactor * time.Second |
| ... | ... |
@@ -71,7 +71,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
| 71 | 71 |
|
| 72 | 72 |
expected = 30 * time.Second / defaultDiscoveryTTLFactor |
| 73 | 73 |
if heartbeat != expected {
|
| 74 |
- t.Fatalf("Heatbeat - Expected : %v, Actual : %v", expected, heartbeat)
|
|
| 74 |
+ t.Fatalf("Heartbeat - Expected : %v, Actual : %v", expected, heartbeat)
|
|
| 75 | 75 |
} |
| 76 | 76 |
|
| 77 | 77 |
clusterOpts = map[string]string{}
|
| ... | ... |
@@ -81,7 +81,7 @@ func TestDiscoveryOpts(t *testing.T) {
|
| 81 | 81 |
} |
| 82 | 82 |
|
| 83 | 83 |
if heartbeat != defaultDiscoveryHeartbeat {
|
| 84 |
- t.Fatalf("Heatbeat - Expected : %v, Actual : %v", defaultDiscoveryHeartbeat, heartbeat)
|
|
| 84 |
+ t.Fatalf("Heartbeat - Expected : %v, Actual : %v", defaultDiscoveryHeartbeat, heartbeat)
|
|
| 85 | 85 |
} |
| 86 | 86 |
|
| 87 | 87 |
expected = defaultDiscoveryHeartbeat * defaultDiscoveryTTLFactor |
| ... | ... |
@@ -44,7 +44,7 @@ type StateInfo struct {
|
| 44 | 44 |
// Stats contains a stats properties from containerd. |
| 45 | 45 |
type Stats containerd.StatsResponse |
| 46 | 46 |
|
| 47 |
-// Summary container a container summary from containerd |
|
| 47 |
+// Summary contains a container summary from containerd |
|
| 48 | 48 |
type Summary struct{}
|
| 49 | 49 |
|
| 50 | 50 |
// User specifies linux specific user and group information for the container's |
| ... | ... |
@@ -20,7 +20,7 @@ type Process struct {
|
| 20 | 20 |
// Stats contains a stats properties from containerd. |
| 21 | 21 |
type Stats struct{}
|
| 22 | 22 |
|
| 23 |
-// Summary container a container summary from containerd |
|
| 23 |
+// Summary contains a container summary from containerd |
|
| 24 | 24 |
type Summary struct{}
|
| 25 | 25 |
|
| 26 | 26 |
// StateInfo contains description about the new state container has entered. |
| ... | ... |
@@ -11,7 +11,7 @@ type Process windowsoci.Process |
| 11 | 11 |
// User specifies user information for the containers main process. |
| 12 | 12 |
type User windowsoci.User |
| 13 | 13 |
|
| 14 |
-// Summary container a container summary from containerd |
|
| 14 |
+// Summary contains a container summary from containerd |
|
| 15 | 15 |
type Summary struct {
|
| 16 | 16 |
Pid uint32 |
| 17 | 17 |
Command string |
| ... | ... |
@@ -5,7 +5,7 @@ import ( |
| 5 | 5 |
"strings" |
| 6 | 6 |
) |
| 7 | 7 |
|
| 8 |
-// setupEnvironmentVariables convert a string array of environment variables |
|
| 8 |
+// setupEnvironmentVariables converts a string array of environment variables |
|
| 9 | 9 |
// into a map as required by the HCS. Source array is in format [v1=k1] [v2=k2] etc. |
| 10 | 10 |
func setupEnvironmentVariables(a []string) map[string]string {
|
| 11 | 11 |
r := make(map[string]string) |
| ... | ... |
@@ -29,13 +29,13 @@ type Spec struct {
|
| 29 | 29 |
Root Root `json:"root"` |
| 30 | 30 |
// Hostname is the container's host name. |
| 31 | 31 |
Hostname string `json:"hostname,omitempty"` |
| 32 |
- // Mounts profile configuration for adding mounts to the container's filesystem. |
|
| 32 |
+ // Mounts profiles configuration for adding mounts to the container's filesystem. |
|
| 33 | 33 |
Mounts []Mount `json:"mounts"` |
| 34 | 34 |
} |
| 35 | 35 |
|
| 36 | 36 |
// Windows contains platform specific configuration for Windows based containers. |
| 37 | 37 |
type Windows struct {
|
| 38 |
- // Resources contain information for handling resource constraints for the container |
|
| 38 |
+ // Resources contains information for handling resource constraints for the container |
|
| 39 | 39 |
Resources *Resources `json:"resources,omitempty"` |
| 40 | 40 |
// Networking contains the platform specific network settings for the container. |
| 41 | 41 |
Networking *Networking `json:"networking,omitempty"` |
| ... | ... |
@@ -143,7 +143,7 @@ type CPU struct {
|
| 143 | 143 |
Percent *int64 `json:"percent,omitempty"` |
| 144 | 144 |
} |
| 145 | 145 |
|
| 146 |
-// Network network resource management information |
|
| 146 |
+// Network contains network resource management information |
|
| 147 | 147 |
type Network struct {
|
| 148 | 148 |
// Bandwidth is the maximum egress bandwidth in bytes per second |
| 149 | 149 |
Bandwidth *uint64 `json:"bandwidth,omitempty"` |
| ... | ... |
@@ -136,7 +136,7 @@ func (o *NamedListOpts) Name() string {
|
| 136 | 136 |
return o.name |
| 137 | 137 |
} |
| 138 | 138 |
|
| 139 |
-//MapOpts holds a map of values and a validation function. |
|
| 139 |
+// MapOpts holds a map of values and a validation function. |
|
| 140 | 140 |
type MapOpts struct {
|
| 141 | 141 |
values map[string]string |
| 142 | 142 |
validator ValidatorFctType |