EtcdDriver implements the Driver. It is used for leader election.
| 12 | |
| 13 | // EtcdDriver implements the Driver. It is used for leader election. |
| 14 | type EtcdDriver struct { |
| 15 | keyer contract.Keyer |
| 16 | client *clientv3.Client |
| 17 | session *concurrency.Session |
| 18 | election *concurrency.Election |
| 19 | } |
| 20 | |
| 21 | // NewEtcdDriver returns a newly constructed *EtcdDriver |
| 22 | func NewEtcdDriver(client *clientv3.Client, keyer contract.Keyer) *EtcdDriver { |
nothing calls this directly
no outgoing calls
no test coverage detected