Browse code

modify some files

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

update some files in the folder of distribution/xfer

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

correct again

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

liwenqi authored on 2016/12/21 15:43:28
Showing 6 changed files
... ...
@@ -287,7 +287,7 @@ func (c *Cluster) Init(req types.InitRequest) (string, error) {
287 287
 	// will be used as local address, if it belongs to this system.
288 288
 	// If the advertise address is not local, then we try to find
289 289
 	// a system address to use as local address. If this fails,
290
-	// we give up and ask user to pass the listen address.
290
+	// we give up and ask the user to pass the listen address.
291 291
 	if net.ParseIP(localAddr).IsUnspecified() {
292 292
 		advertiseIP := net.ParseIP(advertiseHost)
293 293
 
... ...
@@ -78,8 +78,8 @@ func (e *Events) Evict(l chan interface{}) {
78 78
 	e.pub.Evict(l)
79 79
 }
80 80
 
81
-// Log broadcasts event to listeners. Each listener has 100 millisecond for
82
-// receiving event or it will be skipped.
81
+// Log broadcasts event to listeners. Each listener has 100 milliseconds to
82
+// receive the event or it will be skipped.
83 83
 func (e *Events) Log(action, eventType string, actor eventtypes.Actor) {
84 84
 	eventsCounter.Inc()
85 85
 	now := time.Now().UTC()
... ...
@@ -37,7 +37,7 @@ type V2Metadata struct {
37 37
 	HMAC string
38 38
 }
39 39
 
40
-// CheckV2MetadataHMAC return true if the given "meta" is tagged with a hmac hashed by the given "key".
40
+// CheckV2MetadataHMAC returns true if the given "meta" is tagged with a hmac hashed by the given "key".
41 41
 func CheckV2MetadataHMAC(meta *V2Metadata, key []byte) bool {
42 42
 	if len(meta.HMAC) == 0 || len(key) == 0 {
43 43
 		return len(meta.HMAC) == 0 && len(key) == 0
... ...
@@ -26,7 +26,7 @@ type LayerDownloadManager struct {
26 26
 	tm         TransferManager
27 27
 }
28 28
 
29
-// SetConcurrency set the max concurrent downloads for each pull
29
+// SetConcurrency sets the max concurrent downloads for each pull
30 30
 func (ldm *LayerDownloadManager) SetConcurrency(concurrency int) {
31 31
 	ldm.tm.SetConcurrency(concurrency)
32 32
 }
... ...
@@ -87,7 +87,7 @@ type DownloadDescriptorWithRegistered interface {
87 87
 // the layer store, and the key is not used by an in-progress download, the
88 88
 // Download method is called to get the layer tar data. Layers are then
89 89
 // registered in the appropriate order.  The caller must call the returned
90
-// release function once it is is done with the returned RootFS object.
90
+// release function once it is done with the returned RootFS object.
91 91
 func (ldm *LayerDownloadManager) Download(ctx context.Context, initialRootFS image.RootFS, layers []DownloadDescriptor, progressOutput progress.Output) (image.RootFS, func(), error) {
92 92
 	var (
93 93
 		topLayer       layer.Layer
... ...
@@ -300,7 +300,7 @@ func NewTransferManager(concurrencyLimit int) TransferManager {
300 300
 	}
301 301
 }
302 302
 
303
-// SetConcurrency set the concurrencyLimit
303
+// SetConcurrency sets the concurrencyLimit
304 304
 func (tm *transferManager) SetConcurrency(concurrency int) {
305 305
 	tm.mu.Lock()
306 306
 	tm.concurrencyLimit = concurrency
... ...
@@ -19,7 +19,7 @@ type LayerUploadManager struct {
19 19
 	tm TransferManager
20 20
 }
21 21
 
22
-// SetConcurrency set the max concurrent uploads for each push
22
+// SetConcurrency sets the max concurrent uploads for each push
23 23
 func (lum *LayerUploadManager) SetConcurrency(concurrency int) {
24 24
 	lum.tm.SetConcurrency(concurrency)
25 25
 }