2016-04-27 25 views

回答

0

使用新的客戶:

您使用GetOptions.Quorum:https://github.com/coreos/etcd/blob/master/client/keys.go#L211

,你傳遞給KeysAPI.Getcall:https://github.com/coreos/etcd/blob/master/client/keys.go#L103

隨着舊的客戶端:

您使用客戶端上的SetConsistency func。 c := etcd.NewClient(hosts) if err := c.SetConsistency(etcd.STRONG_CONSISTENCY); err != nil { return nil, err } 示例:https://github.com/lytics/metafora/blob/8ec2f856db6abe826989b255a02908fc3f0c5eef/m_etcd/transport.go#L73