fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
bb330cd684
commit
db90724ab0
14 changed files with 14 additions and 14 deletions
|
@ -156,7 +156,7 @@ full and understand the problems behind deletes.
|
||||||
While, at first glance, implementing deleting seems simple, there are a number
|
While, at first glance, implementing deleting seems simple, there are a number
|
||||||
mitigating factors that make many solutions not ideal or even pathological in
|
mitigating factors that make many solutions not ideal or even pathological in
|
||||||
the context of a registry. The following paragraph discuss the background and
|
the context of a registry. The following paragraph discuss the background and
|
||||||
approaches that could be applied to a arrive at a solution.
|
approaches that could be applied to arrive at a solution.
|
||||||
|
|
||||||
The goal of deletes in any system is to remove unused or unneeded data. Only
|
The goal of deletes in any system is to remove unused or unneeded data. Only
|
||||||
data requested for deletion should be removed and no other data. Removing
|
data requested for deletion should be removed and no other data. Removing
|
||||||
|
|
|
@ -1032,7 +1032,7 @@ and proxy connections to the registry server.
|
||||||
no
|
no
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
An array of absolute paths to a x509 CA file
|
An array of absolute paths to an x509 CA file
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -706,7 +706,7 @@ the uploaded blob data.
|
||||||
###### Digest Parameter
|
###### Digest Parameter
|
||||||
|
|
||||||
The "digest" parameter is designed as an opaque parameter to support
|
The "digest" parameter is designed as an opaque parameter to support
|
||||||
verification of a successful transfer. For example, a HTTP URI parameter
|
verification of a successful transfer. For example, an HTTP URI parameter
|
||||||
might be as follows:
|
might be as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -706,7 +706,7 @@ the uploaded blob data.
|
||||||
###### Digest Parameter
|
###### Digest Parameter
|
||||||
|
|
||||||
The "digest" parameter is designed as an opaque parameter to support
|
The "digest" parameter is designed as an opaque parameter to support
|
||||||
verification of a successful transfer. For example, a HTTP URI parameter
|
verification of a successful transfer. For example, an HTTP URI parameter
|
||||||
might be as follows:
|
might be as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -57,7 +57,7 @@ image manifest based on the Content-Type returned in the HTTP response.
|
||||||
|
|
||||||
The manifests field contains a list of manifests for specific platforms.
|
The manifests field contains a list of manifests for specific platforms.
|
||||||
|
|
||||||
Fields of a object in the manifests list are:
|
Fields of an object in the manifests list are:
|
||||||
|
|
||||||
- **`mediaType`** *string*
|
- **`mediaType`** *string*
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// The health package works expvar style. By importing the package the debug
|
// The health package works expvar style. By importing the package the debug
|
||||||
// server is getting a "/debug/health" endpoint that returns the current
|
// server is getting a "/debug/health" endpoint that returns the current
|
||||||
// status of the application.
|
// status of the application.
|
||||||
// If there are no errors, "/debug/health" will return a HTTP 200 status,
|
// If there are no errors, "/debug/health" will return an HTTP 200 status,
|
||||||
// together with an empty JSON reply "{}". If there are any checks
|
// together with an empty JSON reply "{}". If there are any checks
|
||||||
// with errors, the JSON reply will include all the failed checks, and the
|
// with errors, the JSON reply will include all the failed checks, and the
|
||||||
// response will be have an HTTP 503 status.
|
// response will be have an HTTP 503 status.
|
||||||
|
|
|
@ -46,7 +46,7 @@ func (htpasswd *htpasswd) authenticateUser(username string, password string) err
|
||||||
|
|
||||||
// parseHTPasswd parses the contents of htpasswd. This will read all the
|
// parseHTPasswd parses the contents of htpasswd. This will read all the
|
||||||
// entries in the file, whether or not they are needed. An error is returned
|
// entries in the file, whether or not they are needed. An error is returned
|
||||||
// if an syntax errors are encountered or if the reader fails.
|
// if a syntax errors are encountered or if the reader fails.
|
||||||
func parseHTPasswd(rd io.Reader) (map[string][]byte, error) {
|
func parseHTPasswd(rd io.Reader) (map[string][]byte, error) {
|
||||||
entries := map[string][]byte{}
|
entries := map[string][]byte{}
|
||||||
scanner := bufio.NewScanner(rd)
|
scanner := bufio.NewScanner(rd)
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"github.com/docker/distribution/registry/api/errcode"
|
"github.com/docker/distribution/registry/api/errcode"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrNoErrorsInBody is returned when a HTTP response body parses to an empty
|
// ErrNoErrorsInBody is returned when an HTTP response body parses to an empty
|
||||||
// errcode.Errors slice.
|
// errcode.Errors slice.
|
||||||
var ErrNoErrorsInBody = errors.New("no error details found in HTTP response body")
|
var ErrNoErrorsInBody = errors.New("no error details found in HTTP response body")
|
||||||
|
|
||||||
|
|
|
@ -926,7 +926,7 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(stevvooe): Add a test case where we take a mostly valid registry,
|
// TODO(stevvooe): Add a test case where we take a mostly valid registry,
|
||||||
// tamper with the content and ensure that we get a unverified manifest
|
// tamper with the content and ensure that we get an unverified manifest
|
||||||
// error.
|
// error.
|
||||||
|
|
||||||
// Push 2 random layers
|
// Push 2 random layers
|
||||||
|
|
|
@ -20,7 +20,7 @@ func closeResources(handler http.Handler, closers ...io.Closer) http.Handler {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// copyFullPayload copies the payload of a HTTP request to destWriter. If it
|
// copyFullPayload copies the payload of an HTTP request to destWriter. If it
|
||||||
// receives less content than expected, and the client disconnected during the
|
// receives less content than expected, and the client disconnected during the
|
||||||
// upload, it avoids sending a 400 error to keep the logs cleaner.
|
// upload, it avoids sending a 400 error to keep the logs cleaner.
|
||||||
func copyFullPayload(responseWriter http.ResponseWriter, r *http.Request, destWriter io.Writer, context ctxu.Context, action string, errSlice *errcode.Errors) error {
|
func copyFullPayload(responseWriter http.ResponseWriter, r *http.Request, destWriter io.Writer, context ctxu.Context, action string, errSlice *errcode.Errors) error {
|
||||||
|
|
|
@ -267,7 +267,7 @@ func logLevel(level configuration.Loglevel) log.Level {
|
||||||
return l
|
return l
|
||||||
}
|
}
|
||||||
|
|
||||||
// panicHandler add a HTTP handler to web app. The handler recover the happening
|
// panicHandler add an HTTP handler to web app. The handler recover the happening
|
||||||
// panic. logrus.Panic transmits panic message to pre-config log hooks, which is
|
// panic. logrus.Panic transmits panic message to pre-config log hooks, which is
|
||||||
// defined in config.yml.
|
// defined in config.yml.
|
||||||
func panicHandler(handler http.Handler) http.Handler {
|
func panicHandler(handler http.Handler) http.Handler {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
storagemiddleware "github.com/docker/distribution/registry/storage/driver/middleware"
|
storagemiddleware "github.com/docker/distribution/registry/storage/driver/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
// cloudFrontStorageMiddleware provides an simple implementation of layerHandler that
|
// cloudFrontStorageMiddleware provides a simple implementation of layerHandler that
|
||||||
// constructs temporary signed CloudFront URLs from the storagedriver layer URL,
|
// constructs temporary signed CloudFront URLs from the storagedriver layer URL,
|
||||||
// then issues HTTP Temporary Redirects to this CloudFront content URL.
|
// then issues HTTP Temporary Redirects to this CloudFront content URL.
|
||||||
type cloudFrontStorageMiddleware struct {
|
type cloudFrontStorageMiddleware struct {
|
||||||
|
|
|
@ -183,7 +183,7 @@ func TestFileReaderNonExistentFile(t *testing.T) {
|
||||||
// conditions that can arise when reading a layer.
|
// conditions that can arise when reading a layer.
|
||||||
func TestFileReaderErrors(t *testing.T) {
|
func TestFileReaderErrors(t *testing.T) {
|
||||||
// TODO(stevvooe): We need to cover error return types, driven by the
|
// TODO(stevvooe): We need to cover error return types, driven by the
|
||||||
// errors returned via the HTTP API. For now, here is a incomplete list:
|
// errors returned via the HTTP API. For now, here is an incomplete list:
|
||||||
//
|
//
|
||||||
// 1. Layer Not Found: returned when layer is not found or access is
|
// 1. Layer Not Found: returned when layer is not found or access is
|
||||||
// denied.
|
// denied.
|
||||||
|
|
|
@ -35,7 +35,7 @@ type linkedBlobStore struct {
|
||||||
// control the repository blob link set to which the blob store
|
// control the repository blob link set to which the blob store
|
||||||
// dispatches. This is required because manifest and layer blobs have not
|
// dispatches. This is required because manifest and layer blobs have not
|
||||||
// yet been fully merged. At some point, this functionality should be
|
// yet been fully merged. At some point, this functionality should be
|
||||||
// removed an the blob links folder should be merged. The first entry is
|
// removed the blob links folder should be merged. The first entry is
|
||||||
// treated as the "canonical" link location and will be used for writes.
|
// treated as the "canonical" link location and will be used for writes.
|
||||||
linkPathFns []linkPathFunc
|
linkPathFns []linkPathFunc
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue