Commit Graph

17 Commits

Author SHA1 Message Date
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
Kyle Havlovitz 4fc3bd3abf
Added -relay-factor param to keyring operations 2017-02-01 21:53:29 -05:00
R.B. Boyer 291a468c87
Validate gossip encryption key before made persistent in local.keyring 2016-08-12 11:42:45 -07:00
Ryan Uber e764eb62bd agent: write-level keyring ACLs work 2015-07-07 10:36:51 -06:00
Ryan Uber 665551a182 agent: read-level keyring ACLs work 2015-07-07 10:30:34 -06:00
Ryan Uber c9118b53bf agent: fix loading keyring on agent start 2014-11-19 16:37:40 -08:00
Ryan Uber 196cbd27b2 agent: ignore -encrypt if provided when keyring exists 2014-11-19 16:37:40 -08:00
Ryan Uber 3b2ab70c4d consul: clean up comments, fix globalRPC tests 2014-11-19 16:37:40 -08:00
Ryan Uber fcacee723b consul: simplify keyring operations 2014-11-19 16:36:19 -08:00
Ryan Uber d02afd42fb agent: -encrypt appends to keyring if one exists 2014-11-19 16:36:01 -08:00
Ryan Uber c59107f08e command: remove -init argument from keyring, auto-persist keyrings when using agent -encrypt 2014-11-19 16:35:13 -08:00
Ryan Uber 7f85c708dc agent: squash some more common keyring semantics 2014-11-19 16:34:18 -08:00
Ryan Uber daebf39946 agent: guard against empty keyring files 2014-11-19 16:34:18 -08:00
Ryan Uber db0084ccd0 consul: use keyring operation type to cut out duplicated logic 2014-11-19 16:34:18 -08:00
Ryan Uber 71e9715c54 consul: restructuring 2014-11-19 16:34:17 -08:00
Ryan Uber a551a6e4a0 consul: refactor keyring, repeat RPC calls to all DC's 2014-11-19 16:34:17 -08:00
Ryan Uber 72fc1ceead agent: split keyring functionality out of agent.go 2014-11-19 16:32:32 -08:00