Skip to content

Commit

Permalink
config: Consistent Markdown/Go wording for 'hooks'
Browse files Browse the repository at this point in the history
The new wording isn't particularly close to either of the old
wordings, but it reads more clearly to me.  I've also added our usual:

  (<type>, <required|optional>)

to the Markdown so folks can see that this is an optional object
(although see [1] for a more complete version).

[1]: opencontainers#427
     Subject: config: Explicitly list 'hooks' as optional

Signed-off-by: W. Trevor King <wking@tremily.us>
  • Loading branch information
wking authored and Ma Shimiao committed Aug 18, 2016
1 parent 184d182 commit 9af4fa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ _Note: For Solaris, uid and gid specify the uid and gid of the process inside th

## Hooks

**`hooks`** (object, optional) configures callbacks for container lifecycle events.
Lifecycle hooks allow custom events for different points in a container's runtime.
Presently there are `Prestart`, `Poststart` and `Poststop`.

Expand Down
2 changes: 1 addition & 1 deletion specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Spec struct {
Hostname string `json:"hostname,omitempty"`
// Mounts configures additional mounts (on top of Root).
Mounts []Mount `json:"mounts,omitempty"`
// Hooks are the commands run at various lifecycle events of the container.
// Hooks configures callbacks for container lifecycle events.
Hooks Hooks `json:"hooks"`
// Annotations is an unstructured key value map that may be set by external tools to store and retrieve arbitrary metadata.
Annotations map[string]string `json:"annotations,omitempty"`
Expand Down

0 comments on commit 9af4fa5

Please sign in to comment.