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-04-25 09:26:13 -07:00
2017-05-10 23:06:36 +02:00
2017-04-20 09:54:49 -07:00
2017-04-20 09:54:49 -07:00
2017-04-20 09:54:49 -07:00