Skip to content

Commit

Permalink
wait: update docs to indicate default values
Browse files Browse the repository at this point in the history
  • Loading branch information
ryane committed Oct 5, 2016
1 parent 2b5332a commit 034414c
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ failure.)</p>
</ul>

<p>the amount of time the command will wait before halting forcefully. The
format is Go’s duraction string. A duration string is a possibly signed
format is Go’s duration string. A duration string is a possibly signed
sequence of decimal numbers, each with optional fraction and a unit
suffix, such as “300ms”, “-1.5h” or “2h45m”. Valid time units are “ns”,
“us” (or “µs”), “ms”, “s”, “m”, “h”.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ failure.)</p>
</ul>

<p>the amount of time the command will wait before halting forcefully. The
format is Go’s duraction string. A duration string is a possibly signed
format is Go’s duration string. A duration string is a possibly signed
sequence of decimal numbers, each with optional fraction and a unit
suffix, such as “300ms”, “-1.5h” or “2h45m”. Valid time units are “ns”,
“us” (or “µs”), “ms”, “s”, “m”, “h”.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/task/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ <h2 id="parameters">Parameters</h2>
</ul>

<p>the amount of time the command will wait before halting forcefully. The
format is Go&rsquo;s duraction string. A duration string is a possibly signed
format is Go&rsquo;s duration string. A duration string is a possibly signed
sequence of decimal numbers, each with optional fraction and a unit
suffix, such as &ldquo;300ms&rdquo;, &ldquo;-1.5h&rdquo; or &ldquo;2h45m&rdquo;. Valid time units are &ldquo;ns&rdquo;,
&ldquo;us&rdquo; (or &ldquo;µs&rdquo;), &ldquo;ms&rdquo;, &ldquo;s&rdquo;, &ldquo;m&rdquo;, &ldquo;h&rdquo;.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs_source/content/resources/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ failure.)
- `timeout` (duration string)

the amount of time the command will wait before halting forcefully. The
format is Go's duraction string. A duration string is a possibly signed
format is Go's duration string. A duration string is a possibly signed
sequence of decimal numbers, each with optional fraction and a unit
suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns",
"us" (or "µs"), "ms", "s", "m", "h".
Expand Down
16 changes: 9 additions & 7 deletions docs_source/content/resources/wait.port.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "wait.port"
slug: "wait-port"
date: "2016-09-30T10:48:08-04:00"
date: "2016-10-03T10:23:34-04:00"
menu:
main:
parent: resources
Expand All @@ -16,7 +16,6 @@ menu:
wait.port "8080" {
host = "localhost"
port = 8080
protocol = "tcp"
interval = "1s"
max_retry = 10
grace_period = "2s"
Expand All @@ -38,21 +37,24 @@ and the specified Port.

- `interval` (duration string)

the amount of time to wait in between checks. The format is Go's duraction
the amount of time to wait in between checks. The format is Go's duration
string. A duration string is a possibly signed sequence of decimal numbers,
each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or
"2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
"2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". If
the interval is not specified, it will default to 5 seconds.

- `grace_period` (duration string)

the amount of time to wait before running the first check and after a
successful check. The format is Go's duraction string. A duration string is
successful check. The format is Go's duration string. A duration string is
a possibly signed sequence of decimal numbers, each with optional fraction
and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units
are "ns", "us" (or "µs"), "ms", "s", "m", "h".
are "ns", "us" (or "µs"), "ms", "s", "m", "h". If no grace period is
specified, no grace period will be taken into account.

- `max_retry` (int)

the maximum number of attempts before the wait fails.
the maximum number of attempts before the wait fails. If the maximum number
of retries is not set, it will default to 5.


23 changes: 13 additions & 10 deletions docs_source/content/resources/wait.query.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "wait.query"
slug: "wait-query"
date: "2016-09-30T10:48:08-04:00"
date: "2016-10-03T10:23:34-04:00"
menu:
main:
parent: resources
Expand Down Expand Up @@ -47,7 +47,7 @@ the resource is healthy, and 1 (or above) otherwise.
- `timeout` (duration string)

the amount of time the command will wait before halting forcefully. The
format is Go's duraction string. A duration string is a possibly signed
format is Go's duration string. A duration string is a possibly signed
sequence of decimal numbers, each with optional fraction and a unit
suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns",
"us" (or "µs"), "ms", "s", "m", "h".
Expand All @@ -62,21 +62,24 @@ suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns",

- `interval` (duration string)

the amount of time to wait in between checks. The format is Go's duraction
the amount of time to wait in between checks. The format is Go's duration
string. A duration string is a possibly signed sequence of decimal numbers,
each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or
"2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
"2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". If
the interval is not specified, it will default to 5 seconds.

- `grace_period` (duration string)

the amount of time to wait before running the first check. The format is
Go's duraction string. A duration string is a possibly signed sequence of
decimal numbers, each with optional fraction and a unit suffix, such as
"300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"),
"ms", "s", "m", "h".
the amount of time to wait before running the first check and after a
successful check. The format is Go's duration string. A duration string is
a possibly signed sequence of decimal numbers, each with optional fraction
and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units
are "ns", "us" (or "µs"), "ms", "s", "m", "h". If no grace period is
specified, no grace period will be taken into account.

- `max_retry` (int)

the maximum number of attempts before the wait fails.
the maximum number of attempts before the wait fails. If the maximum number
of retries is not set, it will default to 5.


2 changes: 1 addition & 1 deletion resource/shell/preparer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type Preparer struct {
Apply string `hcl:"apply"`

// the amount of time the command will wait before halting forcefully. The
// format is Go's duraction string. A duration string is a possibly signed
// format is Go's duration string. A duration string is a possibly signed
// sequence of decimal numbers, each with optional fraction and a unit
// suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns",
// "us" (or "µs"), "ms", "s", "m", "h".
Expand Down
13 changes: 8 additions & 5 deletions resource/wait/port/preparer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,23 @@ type Preparer struct {
// the TCP port to attempt to connect to.
Port int `hcl:"port" required:"true"`

// the amount of time to wait in between checks. The format is Go's duraction
// the amount of time to wait in between checks. The format is Go's duration
// string. A duration string is a possibly signed sequence of decimal numbers,
// each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or
// "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
// "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". If
// the interval is not specified, it will default to 5 seconds.
Interval string `hcl:"interval" doc_type:"duration string"`

// the amount of time to wait before running the first check and after a
// successful check. The format is Go's duraction string. A duration string is
// successful check. The format is Go's duration string. A duration string is
// a possibly signed sequence of decimal numbers, each with optional fraction
// and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units
// are "ns", "us" (or "µs"), "ms", "s", "m", "h".
// are "ns", "us" (or "µs"), "ms", "s", "m", "h". If no grace period is
// specified, no grace period will be taken into account.
GracePeriod string `hcl:"grace_period" doc_type:"duration string"`

// the maximum number of attempts before the wait fails.
// the maximum number of attempts before the wait fails. If the maximum number
// of retries is not set, it will default to 5.
MaxRetry int `hcl:"max_retry"`
}

Expand Down
15 changes: 9 additions & 6 deletions resource/wait/preparer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Preparer struct {
ExecFlags []string `hcl:"exec_flags"`

// the amount of time the command will wait before halting forcefully. The
// format is Go's duraction string. A duration string is a possibly signed
// format is Go's duration string. A duration string is a possibly signed
// sequence of decimal numbers, each with optional fraction and a unit
// suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns",
// "us" (or "µs"), "ms", "s", "m", "h".
Expand All @@ -53,20 +53,23 @@ type Preparer struct {
// any environment variables that should be passed to the command.
Env map[string]string `hcl:"env"`

// the amount of time to wait in between checks. The format is Go's duraction
// the amount of time to wait in between checks. The format is Go's duration
// string. A duration string is a possibly signed sequence of decimal numbers,
// each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or
// "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
// "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". If
// the interval is not specified, it will default to 5 seconds.
Interval string `hcl:"interval" doc_type:"duration string"`

// the amount of time to wait before running the first check and after a
// successful check. The format is Go's duraction string. A duration string is
// successful check. The format is Go's duration string. A duration string is
// a possibly signed sequence of decimal numbers, each with optional fraction
// and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units
// are "ns", "us" (or "µs"), "ms", "s", "m", "h".
// are "ns", "us" (or "µs"), "ms", "s", "m", "h". If no grace period is
// specified, no grace period will be taken into account.
GracePeriod string `hcl:"grace_period" doc_type:"duration string"`

// the maximum number of attempts before the wait fails.
// the maximum number of attempts before the wait fails. If the maximum number
// of retries is not set, it will default to 5.
MaxRetry int `hcl:"max_retry"`
}

Expand Down

0 comments on commit 034414c

Please sign in to comment.