Frank Schroeder
cd837b0b18
pkg refactor
...
command/agent/* -> agent/*
command/consul/* -> agent/consul/*
command/agent/command{,_test}.go -> command/agent{,_test}.go
command/base/command.go -> command/base.go
command/base/* -> command/*
commands.go -> command/commands.go
The script which did the refactor is:
(
cd $GOPATH/src/github.com/hashicorp/consul
git mv command/agent/command.go command/agent.go
git mv command/agent/command_test.go command/agent_test.go
git mv command/agent/flag_slice_value{,_test}.go command/
git mv command/agent .
git mv command/base/command.go command/base.go
git mv command/base/config_util{,_test}.go command/
git mv commands.go command/
git mv consul agent
rmdir command/base/
gsed -i -e 's|package agent|package command|' command/agent{,_test}.go
gsed -i -e 's|package agent|package command|' command/flag_slice_value{,_test}.go
gsed -i -e 's|package base|package command|' command/base.go command/config_util{,_test}.go
gsed -i -e 's|package main|package command|' command/commands.go
gsed -i -e 's|base.Command|BaseCommand|' command/commands.go
gsed -i -e 's|agent.Command|AgentCommand|' command/commands.go
gsed -i -e 's|\tCommand:|\tBaseCommand:|' command/commands.go
gsed -i -e 's|base\.||' command/commands.go
gsed -i -e 's|command\.||' command/commands.go
gsed -i -e 's|command|c|' main.go
gsed -i -e 's|range Commands|range command.Commands|' main.go
gsed -i -e 's|Commands: Commands|Commands: command.Commands|' main.go
gsed -i -e 's|base\.BoolValue|BoolValue|' command/operator_autopilot_set.go
gsed -i -e 's|base\.DurationValue|DurationValue|' command/operator_autopilot_set.go
gsed -i -e 's|base\.StringValue|StringValue|' command/operator_autopilot_set.go
gsed -i -e 's|base\.UintValue|UintValue|' command/operator_autopilot_set.go
gsed -i -e 's|\bCommand\b|BaseCommand|' command/base.go
gsed -i -e 's|BaseCommand Options|Command Options|' command/base.go
gsed -i -e 's|base.Command|BaseCommand|' command/*.go
gsed -i -e 's|c\.Command|c.BaseCommand|g' command/*.go
gsed -i -e 's|\tCommand:|\tBaseCommand:|' command/*_test.go
gsed -i -e 's|base\.||' command/*_test.go
gsed -i -e 's|\bCommand\b|AgentCommand|' command/agent{,_test}.go
gsed -i -e 's|cmd.AgentCommand|cmd.BaseCommand|' command/agent.go
gsed -i -e 's|cli.AgentCommand = new(Command)|cli.Command = new(AgentCommand)|' command/agent_test.go
gsed -i -e 's|exec.AgentCommand|exec.Command|' command/agent_test.go
gsed -i -e 's|exec.BaseCommand|exec.Command|' command/agent_test.go
gsed -i -e 's|NewTestAgent|agent.NewTestAgent|' command/agent_test.go
gsed -i -e 's|= TestConfig|= agent.TestConfig|' command/agent_test.go
gsed -i -e 's|: RetryJoin|: agent.RetryJoin|' command/agent_test.go
gsed -i -e 's|\.\./\.\./|../|' command/config_util_test.go
gsed -i -e 's|\bverifyUniqueListeners|VerifyUniqueListeners|' agent/config{,_test}.go command/agent.go
gsed -i -e 's|\bserfLANKeyring\b|SerfLANKeyring|g' agent/{agent,keyring,testagent}.go command/agent.go
gsed -i -e 's|\bserfWANKeyring\b|SerfWANKeyring|g' agent/{agent,keyring,testagent}.go command/agent.go
gsed -i -e 's|\bNewAgent\b|agent.New|g' command/agent{,_test}.go
gsed -i -e 's|\bNewAgent|New|' agent/{acl_test,agent,testagent}.go
gsed -i -e 's|\bAgent\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bBool\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bConfig\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bDefaultConfig\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bDevConfig\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bMergeConfig\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bReadConfigPaths\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bParseMetaPair\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bSerfLANKeyring\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|\bSerfWANKeyring\b|agent.&|g' command/agent{,_test}.go
gsed -i -e 's|circonus\.agent|circonus|g' command/agent{,_test}.go
gsed -i -e 's|logger\.agent|logger|g' command/agent{,_test}.go
gsed -i -e 's|metrics\.agent|metrics|g' command/agent{,_test}.go
gsed -i -e 's|// agent.Agent|// agent|' command/agent{,_test}.go
gsed -i -e 's|a\.agent\.Config|a.Config|' command/agent{,_test}.go
gsed -i -e 's|agent\.AppendSliceValue|AppendSliceValue|' command/{configtest,validate}.go
gsed -i -e 's|consul/consul|agent/consul|' GNUmakefile
gsed -i -e 's|\.\./test|../../test|' agent/consul/server_test.go
# fix imports
f=$(grep -rl 'github.com/hashicorp/consul/command/agent' * | grep '\.go')
gsed -i -e 's|github.com/hashicorp/consul/command/agent|github.com/hashicorp/consul/agent|' $f
goimports -w $f
f=$(grep -rl 'github.com/hashicorp/consul/consul' * | grep '\.go')
gsed -i -e 's|github.com/hashicorp/consul/consul|github.com/hashicorp/consul/agent/consul|' $f
goimports -w $f
goimports -w command/*.go main.go
)
2017-06-10 18:52:45 +02:00
Frank Schroeder
b1e97baacb
Fix imports
2017-05-05 17:07:00 +02:00
Frank Schroeder
f50d6871f9
golint: No stutter
2017-04-25 09:26:13 -07:00
James Phillips
8fcf695fa1
Pass state store pointer into the blocking query work function.
...
Previously the blocking functions all closed over the state store from
their first query, with would not have worked properly when a restore
occurred. This makes sure they get a frest state store pointer each time,
and that pointer is synchronized with the abandon watch.
2017-01-25 09:58:23 -08:00
James Phillips
635afd1924
Adds fine-grained watches to health endpoints.
2017-01-25 09:58:22 -08:00
Kyle Havlovitz
fdf2a10835
First pass at adding node meta filter to prepared queries
2017-01-18 16:23:33 -05:00
Kyle Havlovitz
e37f25dc02
Add node metadata filtering to remaining health/catalog endpoints
2017-01-13 20:08:43 -05:00
James Phillips
ee1cf1e13b
Adds distance sorting to health endpoint. Cleans up unit tests.
2015-10-23 15:23:01 -07:00
James Phillips
3fedffbffb
Gets rid of the transitional "New" suffix on state store and RPC.
2015-10-15 14:59:09 -07:00
James Phillips
76bdeadefb
Abstracts the table names away from the RPC call sites.
2015-10-15 14:59:09 -07:00
James Phillips
1463e6100a
Integrates new state store into leader and catalog/health endpoints.
2015-10-15 14:59:09 -07:00
Ryan Uber
36bddeca25
consul: filter services by ACL when using ChecksInState.
2015-07-27 16:57:56 -07:00
Ryan Uber
aa87f2b73c
consul: rename function to avoid collision and clean up
2015-06-11 13:04:47 -07:00
Ryan Uber
1ff496d6dd
consul: break acl filtering into a separate struct
2015-06-11 12:08:21 -07:00
Ryan Uber
4f3e661b8c
acl: initial pass at service discovery acls
2015-06-10 18:40:09 -07:00
Armon Dadgar
710a823379
consul: Merging BlockingQuery into QueryOptions
2014-04-21 11:31:15 -07:00
Armon Dadgar
55b5fd4e6a
consul: Use QueryMeta to simplify blockingRPC interface
2014-04-21 11:18:27 -07:00
Armon Dadgar
5b91b6f06e
consul: Moving QueryMeta handling into blockingRPC
2014-04-21 11:04:52 -07:00
Armon Dadgar
9e0e5259f9
consul: Adding support for QueryMeta on all queries
2014-04-21 10:59:46 -07:00
Armon Dadgar
4c7d9a01b3
consul: Switch to RPCInfo
2014-04-21 10:59:46 -07:00
Armon Dadgar
b10df9ea60
consul: Export some telemetry on service queries
2014-04-04 14:55:44 -07:00
Armon Dadgar
944cbc7291
consul: Health endpoints support blocking queries
2014-02-05 13:30:18 -08:00
Armon Dadgar
369193fbd6
consul: updating state store to associate changes with raft index
2014-02-04 18:33:15 -08:00
Armon Dadgar
f410802055
Adding Health endpoint to combine service nodes with health
2014-01-08 15:06:13 -08:00
Armon Dadgar
918b83bf4e
First pass at health endpoints
2014-01-08 13:56:34 -08:00
Armon Dadgar
dff6b6e3c5
Adding stubs for Health endpoints
2014-01-08 13:52:09 -08:00