Signed-off-by: allencloud <allen.sun@daocloud.io>
allencloud authored on 2016/03/12 00:02:17... | ... |
@@ -75,8 +75,8 @@ func discoveryOpts(clusterOpts map[string]string) (time.Duration, time.Duration, |
75 | 75 |
return heartbeat, ttl, nil |
76 | 76 |
} |
77 | 77 |
|
78 |
-// initDiscovery initialized the nodes discovery subsystem by connecting to the specified backend |
|
79 |
-// and start a registration loop to advertise the current node under the specified address. |
|
78 |
+// initDiscovery initializes the nodes discovery subsystem by connecting to the specified backend |
|
79 |
+// and starts a registration loop to advertise the current node under the specified address. |
|
80 | 80 |
func initDiscovery(backendAddress, advertiseAddress string, clusterOpts map[string]string) (discoveryReloader, error) { |
81 | 81 |
heartbeat, backend, err := parseDiscoveryOptions(backendAddress, clusterOpts) |
82 | 82 |
if err != nil { |
... | ... |
@@ -29,7 +29,7 @@ type V1Image struct { |
29 | 29 |
Created time.Time `json:"created"` |
30 | 30 |
// Container is the id of the container used to commit |
31 | 31 |
Container string `json:"container,omitempty"` |
32 |
- // ContainerConfig is the configuration of the container that is committed into the image |
|
32 |
+ // ContainerConfig is the configuration of the container that is committed into the image |
|
33 | 33 |
ContainerConfig container.Config `json:"container_config,omitempty"` |
34 | 34 |
// DockerVersion specifies version on which image is built |
35 | 35 |
DockerVersion string `json:"docker_version,omitempty"` |
... | ... |
@@ -6,7 +6,7 @@ import "github.com/docker/docker/layer" |
6 | 6 |
|
7 | 7 |
// RootFS describes images root filesystem |
8 | 8 |
// This is currently a placeholder that only supports layers. In the future |
9 |
-// this can be made into a interface that supports different implementations. |
|
9 |
+// this can be made into an interface that supports different implementations. |
|
10 | 10 |
type RootFS struct { |
11 | 11 |
Type string `json:"type"` |
12 | 12 |
DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` |
... | ... |
@@ -12,7 +12,7 @@ import ( |
12 | 12 |
|
13 | 13 |
// RootFS describes images root filesystem |
14 | 14 |
// This is currently a placeholder that only supports layers. In the future |
15 |
-// this can be made into a interface that supports different implementations. |
|
15 |
+// this can be made into an interface that supports different implementations. |
|
16 | 16 |
type RootFS struct { |
17 | 17 |
Type string `json:"type"` |
18 | 18 |
DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` |
... | ... |
@@ -1,11 +1,11 @@ |
1 |
-// Package layer is package for managing read only |
|
1 |
+// Package layer is package for managing read-only |
|
2 | 2 |
// and read-write mounts on the union file system |
3 | 3 |
// driver. Read-only mounts are referenced using a |
4 | 4 |
// content hash and are protected from mutation in |
5 | 5 |
// the exposed interface. The tar format is used |
6 |
-// to create read only layers and export both |
|
7 |
-// read only and writable layers. The exported |
|
8 |
-// tar data for a read only layer should match |
|
6 |
+// to create read-only layers and export both |
|
7 |
+// read-only and writable layers. The exported |
|
8 |
+// tar data for a read-only layer should match |
|
9 | 9 |
// the tar used to create the layer. |
10 | 10 |
package layer |
11 | 11 |
|
... | ... |
@@ -75,7 +75,7 @@ type TarStreamer interface { |
75 | 75 |
TarStream() (io.ReadCloser, error) |
76 | 76 |
} |
77 | 77 |
|
78 |
-// Layer represents a read only layer |
|
78 |
+// Layer represents a read-only layer |
|
79 | 79 |
type Layer interface { |
80 | 80 |
TarStreamer |
81 | 81 |
|
... | ... |
@@ -138,7 +138,7 @@ type RWLayer interface { |
138 | 138 |
} |
139 | 139 |
|
140 | 140 |
// Metadata holds information about a |
141 |
-// read only layer |
|
141 |
+// read-only layer |
|
142 | 142 |
type Metadata struct { |
143 | 143 |
// ChainID is the content hash of the layer |
144 | 144 |
ChainID ChainID |
... | ... |
@@ -247,7 +247,7 @@ func ReleaseAndLog(ls Store, l Layer) { |
247 | 247 |
LogReleaseMetadata(metadata) |
248 | 248 |
} |
249 | 249 |
|
250 |
-// LogReleaseMetadata logs a metadata array, use this to |
|
250 |
+// LogReleaseMetadata logs a metadata array, uses this to |
|
251 | 251 |
// ensure consistent logging for release metadata |
252 | 252 |
func LogReleaseMetadata(metadatas []Metadata) { |
253 | 253 |
for _, metadata := range metadatas { |
... | ... |
@@ -11,7 +11,7 @@ import ( |
11 | 11 |
) |
12 | 12 |
|
13 | 13 |
// ReadMemInfo retrieves memory statistics of the host system and returns a |
14 |
-// MemInfo type. |
|
14 |
+// MemInfo type. |
|
15 | 15 |
func ReadMemInfo() (*MemInfo, error) { |
16 | 16 |
file, err := os.Open("/proc/meminfo") |
17 | 17 |
if err != nil { |
... | ... |
@@ -22,8 +22,7 @@ func ReadMemInfo() (*MemInfo, error) { |
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
// parseMemInfo parses the /proc/meminfo file into |
25 |
-// a MemInfo object given a io.Reader to the file. |
|
26 |
-// |
|
25 |
+// a MemInfo object given an io.Reader to the file. |
|
27 | 26 |
// Throws error if there are problems reading from the file |
28 | 27 |
func parseMemInfo(reader io.Reader) (*MemInfo, error) { |
29 | 28 |
meminfo := &MemInfo{} |