open-consul/command/agent
Frank Schroeder d6eb1d434f agent: Replace client/server with delegate interface
This patch adds a new internal interface clientServer
which defines the common methods of consul.Client and
consul.Server. This allows to replace the following
code

    if a.server != nil {
        a.server.do()
    } else {
        a.client.do()
    }

with

    a.delegate.do()

In case a specific type is required a type check can
be performed:

    if srv, ok := a.delegate.(*consul.Server); ok {
        srv.doSrv()
    }
2017-05-15 18:35:38 +02:00
..
acl.go
acl_endpoint.go
acl_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
acl_test.go test: add helper for ioutil.TempDir/TempFile 2017-05-12 22:12:47 +02:00
agent.go agent: Replace client/server with delegate interface 2017-05-15 18:35:38 +02:00
agent_endpoint.go agent: Replace client/server with delegate interface 2017-05-15 18:35:38 +02:00
agent_endpoint_test.go agent: Replace client/server with delegate interface 2017-05-15 18:35:38 +02:00
agent_test.go agent: Replace client/server with delegate interface 2017-05-15 18:35:38 +02:00
bindata_assetfs.go Updates built-in static assets for web UI. 2017-05-08 19:50:54 -07:00
catalog_endpoint.go api: Return empty list instead of nil 2017-04-28 15:00:08 -07:00
catalog_endpoint_test.go test: inline request body encoding 2017-05-10 17:42:38 +02:00
check.go
check_test.go retry: Removes the description parameter. 2017-05-05 17:07:03 +02:00
command.go agent: Replace client/server with delegate interface 2017-05-15 18:35:38 +02:00
command_test.go test: add helper for ioutil.TempDir/TempFile 2017-05-12 22:12:47 +02:00
config.go agent: allow "::" as IPv6 bind address 2017-05-15 17:51:33 +02:00
config_aws.go Move AWS discovery code to command/agent/config_aws.go 2017-05-04 01:41:47 +02:00
config_gce.go Move GCE discovery code to command/agent/config_gce.go 2017-05-04 01:41:47 +02:00
config_test.go test: add helper for ioutil.TempDir/TempFile 2017-05-12 22:12:47 +02:00
coordinate_endpoint.go
coordinate_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
dns.go
dns_test.go Tweaks some tests that were having a hard time in Travis CI and 2017-05-09 06:48:26 -07:00
event_endpoint.go
event_endpoint_test.go test: replace blocks and comments with sub-tests 2017-05-10 17:42:38 +02:00
flag_slice_value.go
flag_slice_value_test.go Revert "test: Run command/agent tests in parallel" 2017-04-27 14:39:04 -07:00
health_endpoint.go api: Return empty list instead of nil 2017-04-28 15:00:08 -07:00
health_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
http.go agent: drop atlas/scada code 2017-05-10 23:06:36 +02:00
http_api.md
http_test.go test: add helper for ioutil.TempDir/TempFile 2017-05-12 22:12:47 +02:00
keyring.go agent: Replace client/server with delegate interface 2017-05-15 18:35:38 +02:00
keyring_test.go test: add helper for ioutil.TempDir/TempFile 2017-05-12 22:12:47 +02:00
kvs_endpoint.go
kvs_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
local.go
local_test.go test: Fix badly formatted retry.Run tests 2017-05-05 17:07:03 +02:00
operator_endpoint.go
operator_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
prepared_query_endpoint.go
prepared_query_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
remote_exec.go
remote_exec_test.go Revert "test: Run command/agent tests in parallel" 2017-04-27 14:39:04 -07:00
session_endpoint.go
session_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
snapshot_endpoint.go
snapshot_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
status_endpoint.go
status_endpoint_test.go Revert "test: Run command/agent tests in parallel" 2017-04-27 14:39:04 -07:00
structs.go
structs_test.go Revert "test: Run command/agent tests in parallel" 2017-04-27 14:39:04 -07:00
translate_addr.go
txn_endpoint.go
txn_endpoint_test.go test: drop error check on http.NewRequest 2017-05-10 17:42:38 +02:00
ui_endpoint.go
ui_endpoint_test.go test: add helper for ioutil.TempDir/TempFile 2017-05-12 22:12:47 +02:00
user_event.go
user_event_test.go retry: Removes the description parameter. 2017-05-05 17:07:03 +02:00
util.go
util_test.go test: add helper for ioutil.TempDir/TempFile 2017-05-12 22:12:47 +02:00
watch_handler.go
watch_handler_test.go Revert "test: Run command/agent tests in parallel" 2017-04-27 14:39:04 -07:00