Seth Vargo
0170a28ec9
Use new APIs
2017-03-23 18:48:13 -04:00
James Phillips
1091c7314e
Removes remoteConsuls in favor of the new router.
...
This has the next wave of RTT integration with the router and also
factors some common RTT-related helpers out to lib. While we were
in here we also got rid of the coordinate disable config so we don't
need to deal with the complexity in the router (there was never a
user-visible way to disable coordinates).
2017-03-16 16:42:19 -07:00
Kyle Havlovitz
211995bc3c
Convert agent command to use base.Command
2017-02-24 18:11:05 -08:00
Kyle Havlovitz
e44bcb9716
Add tests for node metadata functionality
2017-01-05 17:21:56 -08:00
James Phillips
171ec6e487
Fixes a race in the monitor endpoint test that would cause panics.
2016-12-14 18:13:30 -08:00
James Phillips
03f40116f4
Adds complete ACL coverage for non-utility agent endpoints.
...
This is a checkpoint - we need to complete some unit tests for agent/acl.go.
2016-12-14 14:53:40 -08:00
James Phillips
01b6766099
Adds complete ACL support for agent utility endpoints.
2016-12-14 11:12:55 -08:00
James Phillips
34da7ccd64
Adds a unit test to make sure the status endpoint doesn't ever show anything
...
with "token" in the name.
2016-12-14 07:07:41 -08:00
Kyle Havlovitz
ead30ca62b
Fix race issue in monitor endpoint test
2016-12-01 13:40:00 -05:00
Kyle Havlovitz
bd69c6d871
Add reload/leave http endpoints ( #2516 )
2016-11-30 13:29:42 -05:00
Seth Vargo
4179aacf11
Add an API method for determining the best status
...
Given a list of HealthChecks, this determines the "best" status for the
collective group. This is useful for nodes and services, which may have
multiple checks associated with them.
2016-11-29 18:41:46 -05:00
Kyle Havlovitz
338e36cc5d
Add logWriter to agent Create() method
2016-11-28 18:36:26 -05:00
Kyle Havlovitz
124f907063
Add monitor http endpoint
2016-11-28 18:36:26 -05:00
Kyle Havlovitz
3add830b3a
Test fixes ( #2434 )
...
* Test fixes in health_endpoint_test.go, agent_endpoint_test.go and rtt_test.go
* Don't reuse the same agent config in TestAgent_ReconnectConfigSettings
2016-10-25 13:46:54 -07:00
Sean Chittenden
e9a2f5b40c
Chase casting types.CheckID to a string into the state_store.
...
It turns out the indexer can only use strings as arguments when
creating a query. Cast `types.CheckID` to a `string` before calling
into `memdb`.
Ideally the indexer would be smart enough to do this at compile-time,
but I need to look into how to do this without reflection and the
runtime package. For the time being statically cast `types.CheckID`
to a `string` at the call sites.
2016-06-07 16:59:02 -04:00
Sean Chittenden
e63d3a1275
Update Check API to use constants
...
Use constants where appropriate to advocate their use. Also add a deprecation notice re: `updateTTL`.
2016-04-23 16:01:59 -07:00
James Phillips
7ebad899da
Adds a new PUT-based TTL check update endpoint.
2016-03-02 17:54:01 -08:00
James Phillips
f9da231a1c
Adds coordinate of agent to self endpoint.
2015-10-23 15:23:01 -07:00
Ryan Uber
039938a7e0
agent: testing node/service maintenance using tokens
2015-09-10 12:08:08 -07:00
Armon Dadgar
8d86290ebf
Fixing merge conflict
2015-05-11 16:48:10 -07:00
Ryan Uber
2b62f2f172
agent: use an additional parameter for passing tokens
2015-05-04 17:48:05 -07:00
Ryan Uber
35f5a65fb7
agent: more tests
2015-04-28 13:06:02 -07:00
Ryan Mills
275af975e8
Allow specifying a status field in the agent/service/register and agent/check/register endpoints.
...
This status must be one of the valid check statuses: 'passing', 'warning', 'critical', 'unknown'.
If the status field is not present or the empty string, the default of 'critical' is used.
2015-04-12 02:00:31 +00:00
Ryan Uber
5aa69827f8
agent: fix test
2015-01-21 14:12:18 -08:00
Ryan Uber
61d17e65f5
agent: prevent duplicate error messages for maintenance api
2015-01-21 13:28:26 -08:00
Ryan Uber
f00b5b542e
agent: support passing ?reason= for custom notes field values on maintenance checks
2015-01-21 12:21:57 -08:00
Ryan Uber
2a7211cd5d
agent: support adding multiple checks during service registration from the API
2015-01-20 21:48:45 -08:00
Ryan Uber
674be58e55
agent: support multiple checks per service
2015-01-20 21:48:42 -08:00
Ryan Uber
ba2d0fa7e3
agent: maintenance logging + unique service check IDs
2015-01-16 15:38:13 -08:00
Ryan Uber
8cf4e9889e
agent: test node maintenance mode
2015-01-16 15:38:13 -08:00
Ryan Uber
7748c62d09
agent: node maintenance mode works
2015-01-16 15:38:13 -08:00
Ryan Uber
9ee1e6e858
agent: maintenance mode api's are idempotent
2015-01-16 15:37:52 -08:00
Ryan Uber
35c10a902f
agent: test http endpoints for maintenance mode
2015-01-16 15:37:51 -08:00
Ryan Uber
9f9087badb
agent: prefer config over persisted services/checks ( #497 )
2014-11-24 19:40:53 -08:00
Ryan Uber
10610d3d26
agent: fix failing test
2014-10-15 15:03:43 -07:00
William Tisäter
d794a18761
Return both member and config in `/v1/agent/self`
2014-05-28 00:09:28 +02:00
William Tisäter
d0e447d29b
Add `/v1/agent/self` and return local agent config
2014-05-27 01:15:33 +02:00
Armon Dadgar
14be60aaca
gofmt
2014-05-20 16:25:29 -07:00
William Tisäter
8e6ae4019b
Fix race condition in `TestHTTPAgentJoin_WAN`
2014-05-09 02:30:05 +02:00
William Tisäter
ab209c0176
Remove all sleeps from `agent_endpoint_test.go`
2014-05-07 22:50:18 +02:00
Armon Dadgar
8dd1e51bae
agent: Simplifying configs
2014-04-11 15:46:55 -07:00
Armon Dadgar
8db2e3bd58
agent: Support multiple tags per service registration
2014-04-03 12:12:23 -07:00
Armon Dadgar
49378a0323
agent: Fixing test with new struct
2014-02-04 18:32:17 -08:00
Armon Dadgar
b9e1b2c362
agent: test the register/deregister service endpoint
2014-01-30 15:56:03 -08:00
Armon Dadgar
1a5a91419b
agent: Adding tests for agent check endpoints
2014-01-30 15:51:15 -08:00
Armon Dadgar
410a0de0c8
Seperate localState from Agent
2014-01-21 11:52:25 -08:00
Armon Dadgar
a6e4235b96
Adding tests for checks and services endpoints
2014-01-20 15:06:44 -10:00
Armon Dadgar
21e614ca07
Adding tests for the agent HTTP endpoints
2014-01-06 13:21:48 -08:00