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>
This commit is contained in:
liwenqi 2016-12-21 14:43:28 +08:00
parent fb41283e49
commit 128d07d349
6 changed files with 8 additions and 8 deletions

View File

@ -287,7 +287,7 @@ func (c *Cluster) Init(req types.InitRequest) (string, error) {
// will be used as local address, if it belongs to this system.
// If the advertise address is not local, then we try to find
// a system address to use as local address. If this fails,
// we give up and ask user to pass the listen address.
// we give up and ask the user to pass the listen address.
if net.ParseIP(localAddr).IsUnspecified() {
advertiseIP := net.ParseIP(advertiseHost)

View File

@ -78,8 +78,8 @@ func (e *Events) Evict(l chan interface{}) {
e.pub.Evict(l)
}
// Log broadcasts event to listeners. Each listener has 100 millisecond for
// receiving event or it will be skipped.
// Log broadcasts event to listeners. Each listener has 100 milliseconds to
// receive the event or it will be skipped.
func (e *Events) Log(action, eventType string, actor eventtypes.Actor) {
eventsCounter.Inc()
now := time.Now().UTC()

View File

@ -37,7 +37,7 @@ type V2Metadata struct {
HMAC string
}
// CheckV2MetadataHMAC return true if the given "meta" is tagged with a hmac hashed by the given "key".
// CheckV2MetadataHMAC returns true if the given "meta" is tagged with a hmac hashed by the given "key".
func CheckV2MetadataHMAC(meta *V2Metadata, key []byte) bool {
if len(meta.HMAC) == 0 || len(key) == 0 {
return len(meta.HMAC) == 0 && len(key) == 0

View File

@ -26,7 +26,7 @@ type LayerDownloadManager struct {
tm TransferManager
}
// SetConcurrency set the max concurrent downloads for each pull
// SetConcurrency sets the max concurrent downloads for each pull
func (ldm *LayerDownloadManager) SetConcurrency(concurrency int) {
ldm.tm.SetConcurrency(concurrency)
}
@ -87,7 +87,7 @@ type DownloadDescriptorWithRegistered interface {
// the layer store, and the key is not used by an in-progress download, the
// Download method is called to get the layer tar data. Layers are then
// registered in the appropriate order. The caller must call the returned
// release function once it is is done with the returned RootFS object.
// release function once it is done with the returned RootFS object.
func (ldm *LayerDownloadManager) Download(ctx context.Context, initialRootFS image.RootFS, layers []DownloadDescriptor, progressOutput progress.Output) (image.RootFS, func(), error) {
var (
topLayer layer.Layer

View File

@ -300,7 +300,7 @@ func NewTransferManager(concurrencyLimit int) TransferManager {
}
}
// SetConcurrency set the concurrencyLimit
// SetConcurrency sets the concurrencyLimit
func (tm *transferManager) SetConcurrency(concurrency int) {
tm.mu.Lock()
tm.concurrencyLimit = concurrency

View File

@ -19,7 +19,7 @@ type LayerUploadManager struct {
tm TransferManager
}
// SetConcurrency set the max concurrent uploads for each push
// SetConcurrency sets the max concurrent uploads for each push
func (lum *LayerUploadManager) SetConcurrency(concurrency int) {
lum.tm.SetConcurrency(concurrency)
}