Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor documentation fixes #96

Merged
merged 2 commits into from
Apr 30, 2014
Merged

Minor documentation fixes #96

merged 2 commits into from
Apr 30, 2014

Conversation

gmr
Copy link
Contributor

@gmr gmr commented Apr 30, 2014

  • Correct spotted typos
  • Ran JSON snippets through jsonpp for consistent display of JSON results
  • Unfortunately my editor stripped EOL whitespace so there's a bit of whitespace diff
  • Fixed the check TTL & interval values, consul raises an exception when passed in as strings

- Correct spotted typos
- Ran JSON snippets through jsonpp for consistent display of JSON results
- Unfortunately my editor stripped EOL whitespace so there's a bit of whitespace diff
"Script": "/usr/local/bin/check_mem.py",
"Interval": "10s",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be strings. The numeric value 10 actually means 10 nanoseconds in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I open an issue on the string format not working then?

curl --verbose \
>      -i \
>      -H "Accept: application/json" \
>      -X PUT -d '{"ID": "mem", "Name": "Memory utilization", "Notes": "Ensure we dont oversubscribe memory", "Script": "/usr/local/bin/check_mem.py", "Interval": "10s", "TTL": "15s"}' \
>      http://localhost:8500/v1/agent/check/register

> PUT /v1/agent/check/register HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:8500
> Accept: application/json
> Content-Length: 165
> Content-Type: application/x-www-form-urlencoded

< HTTP/1.1 400 Bad Request
< Date: Wed, 30 Apr 2014 19:33:44 GMT
< Content-Length: 88
< Content-Type: text/plain; charset=utf-8

Request decode failed: json: cannot unmarshal string into Go value of type time.Durations826

@armon
Copy link
Member

armon commented Apr 30, 2014

If you could review the Interval and TTL back to strings, I'll gladly merge

@armon
Copy link
Member

armon commented Apr 30, 2014

@gmr That was also an issue with 0.1. Fix is in master.

@armon
Copy link
Member

armon commented Apr 30, 2014

LGTM! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants