mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
9ad946eded
commit
bbeb859b64
6 changed files with 14 additions and 15 deletions
|
@ -75,8 +75,8 @@ func discoveryOpts(clusterOpts map[string]string) (time.Duration, time.Duration,
|
||||||
return heartbeat, ttl, nil
|
return heartbeat, ttl, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// initDiscovery initialized the nodes discovery subsystem by connecting to the specified backend
|
// initDiscovery initializes the nodes discovery subsystem by connecting to the specified backend
|
||||||
// and start a registration loop to advertise the current node under the specified address.
|
// and starts a registration loop to advertise the current node under the specified address.
|
||||||
func initDiscovery(backendAddress, advertiseAddress string, clusterOpts map[string]string) (discoveryReloader, error) {
|
func initDiscovery(backendAddress, advertiseAddress string, clusterOpts map[string]string) (discoveryReloader, error) {
|
||||||
heartbeat, backend, err := parseDiscoveryOptions(backendAddress, clusterOpts)
|
heartbeat, backend, err := parseDiscoveryOptions(backendAddress, clusterOpts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -29,7 +29,7 @@ type V1Image struct {
|
||||||
Created time.Time `json:"created"`
|
Created time.Time `json:"created"`
|
||||||
// Container is the id of the container used to commit
|
// Container is the id of the container used to commit
|
||||||
Container string `json:"container,omitempty"`
|
Container string `json:"container,omitempty"`
|
||||||
// ContainerConfig is the configuration of the container that is committed into the image
|
// ContainerConfig is the configuration of the container that is committed into the image
|
||||||
ContainerConfig container.Config `json:"container_config,omitempty"`
|
ContainerConfig container.Config `json:"container_config,omitempty"`
|
||||||
// DockerVersion specifies version on which image is built
|
// DockerVersion specifies version on which image is built
|
||||||
DockerVersion string `json:"docker_version,omitempty"`
|
DockerVersion string `json:"docker_version,omitempty"`
|
||||||
|
|
|
@ -6,7 +6,7 @@ import "github.com/docker/docker/layer"
|
||||||
|
|
||||||
// RootFS describes images root filesystem
|
// RootFS describes images root filesystem
|
||||||
// This is currently a placeholder that only supports layers. In the future
|
// This is currently a placeholder that only supports layers. In the future
|
||||||
// this can be made into a interface that supports different implementations.
|
// this can be made into an interface that supports different implementations.
|
||||||
type RootFS struct {
|
type RootFS struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
DiffIDs []layer.DiffID `json:"diff_ids,omitempty"`
|
DiffIDs []layer.DiffID `json:"diff_ids,omitempty"`
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
// RootFS describes images root filesystem
|
// RootFS describes images root filesystem
|
||||||
// This is currently a placeholder that only supports layers. In the future
|
// This is currently a placeholder that only supports layers. In the future
|
||||||
// this can be made into a interface that supports different implementations.
|
// this can be made into an interface that supports different implementations.
|
||||||
type RootFS struct {
|
type RootFS struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
DiffIDs []layer.DiffID `json:"diff_ids,omitempty"`
|
DiffIDs []layer.DiffID `json:"diff_ids,omitempty"`
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// Package layer is package for managing read only
|
// Package layer is package for managing read-only
|
||||||
// and read-write mounts on the union file system
|
// and read-write mounts on the union file system
|
||||||
// driver. Read-only mounts are referenced using a
|
// driver. Read-only mounts are referenced using a
|
||||||
// content hash and are protected from mutation in
|
// content hash and are protected from mutation in
|
||||||
// the exposed interface. The tar format is used
|
// the exposed interface. The tar format is used
|
||||||
// to create read only layers and export both
|
// to create read-only layers and export both
|
||||||
// read only and writable layers. The exported
|
// read-only and writable layers. The exported
|
||||||
// tar data for a read only layer should match
|
// tar data for a read-only layer should match
|
||||||
// the tar used to create the layer.
|
// the tar used to create the layer.
|
||||||
package layer
|
package layer
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ type TarStreamer interface {
|
||||||
TarStream() (io.ReadCloser, error)
|
TarStream() (io.ReadCloser, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Layer represents a read only layer
|
// Layer represents a read-only layer
|
||||||
type Layer interface {
|
type Layer interface {
|
||||||
TarStreamer
|
TarStreamer
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ type RWLayer interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Metadata holds information about a
|
// Metadata holds information about a
|
||||||
// read only layer
|
// read-only layer
|
||||||
type Metadata struct {
|
type Metadata struct {
|
||||||
// ChainID is the content hash of the layer
|
// ChainID is the content hash of the layer
|
||||||
ChainID ChainID
|
ChainID ChainID
|
||||||
|
@ -247,7 +247,7 @@ func ReleaseAndLog(ls Store, l Layer) {
|
||||||
LogReleaseMetadata(metadata)
|
LogReleaseMetadata(metadata)
|
||||||
}
|
}
|
||||||
|
|
||||||
// LogReleaseMetadata logs a metadata array, use this to
|
// LogReleaseMetadata logs a metadata array, uses this to
|
||||||
// ensure consistent logging for release metadata
|
// ensure consistent logging for release metadata
|
||||||
func LogReleaseMetadata(metadatas []Metadata) {
|
func LogReleaseMetadata(metadatas []Metadata) {
|
||||||
for _, metadata := range metadatas {
|
for _, metadata := range metadatas {
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReadMemInfo retrieves memory statistics of the host system and returns a
|
// ReadMemInfo retrieves memory statistics of the host system and returns a
|
||||||
// MemInfo type.
|
// MemInfo type.
|
||||||
func ReadMemInfo() (*MemInfo, error) {
|
func ReadMemInfo() (*MemInfo, error) {
|
||||||
file, err := os.Open("/proc/meminfo")
|
file, err := os.Open("/proc/meminfo")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -22,8 +22,7 @@ func ReadMemInfo() (*MemInfo, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseMemInfo parses the /proc/meminfo file into
|
// parseMemInfo parses the /proc/meminfo file into
|
||||||
// a MemInfo object given a io.Reader to the file.
|
// a MemInfo object given an io.Reader to the file.
|
||||||
//
|
|
||||||
// Throws error if there are problems reading from the file
|
// Throws error if there are problems reading from the file
|
||||||
func parseMemInfo(reader io.Reader) (*MemInfo, error) {
|
func parseMemInfo(reader io.Reader) (*MemInfo, error) {
|
||||||
meminfo := &MemInfo{}
|
meminfo := &MemInfo{}
|
||||||
|
|
Loading…
Reference in a new issue