Frank Schroeder
e2c37b47ee
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
..
2017-05-10 17:42:38 +02:00
2017-04-20 09:02:59 -07:00
2017-05-12 22:12:47 +02:00
2017-04-25 09:26:13 -07:00
2017-05-15 18:35:38 +02:00
2017-05-15 18:35:38 +02:00
2017-05-15 18:35:38 +02:00
2017-05-15 18:35:38 +02:00
2017-05-08 19:50:54 -07:00
2017-05-10 17:42:38 +02:00
2017-04-28 15:00:08 -07:00
2017-05-05 17:07:03 +02:00
2017-04-25 09:26:13 -07:00
2017-05-12 22:12:47 +02:00
2017-05-15 18:35:38 +02:00
2017-05-04 01:41:47 +02:00
2017-05-04 01:41:47 +02:00
2017-05-12 22:12:47 +02:00
2017-05-15 17:51:33 +02:00
2017-05-10 17:42:38 +02:00
2017-04-25 09:26:13 -07:00
2017-05-09 06:48:26 -07:00
2017-03-02 14:49:36 -08:00
2017-05-10 17:42:38 +02:00
2017-04-20 09:02:59 -07:00
2017-04-27 14:39:04 -07:00
2017-05-10 17:42:38 +02:00
2017-04-28 15:00:08 -07:00
2017-05-12 22:12:47 +02:00
2017-05-10 23:06:36 +02:00
2017-05-12 22:12:47 +02:00
2017-05-15 18:35:38 +02:00
2017-05-10 17:42:38 +02:00
2017-04-25 09:26:13 -07:00
2017-05-05 17:07:03 +02:00
2017-04-25 09:26:13 -07:00
2017-05-10 17:42:38 +02:00
2017-04-25 09:26:13 -07:00
2017-05-10 17:42:38 +02:00
2017-04-25 09:26:13 -07:00
2017-04-27 14:39:04 -07:00
2017-04-20 09:54:49 -07:00
2017-05-10 17:42:38 +02:00
2017-04-25 09:26:13 -07:00
2017-05-10 17:42:38 +02:00
2016-10-25 19:20:24 -07:00
2017-04-27 14:39:04 -07:00
2017-04-27 14:39:04 -07:00
2017-04-20 09:54:49 -07:00
2016-08-15 15:05:02 -07:00
2017-05-10 17:42:38 +02:00
2017-04-25 09:26:13 -07:00
2017-05-12 22:12:47 +02:00
2017-04-20 09:54:49 -07:00
2017-05-05 17:07:03 +02:00
2017-03-30 09:43:32 -07:00
2017-05-12 22:12:47 +02:00
2017-02-28 13:41:09 -08:00
2017-04-27 14:39:04 -07:00
2016-10-04 09:36:41 -06:00