mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3: support MemberAdd for learner
Added IsLearner flag to clientv3 MemberAdd API.
This commit is contained in:
@@ -118,7 +118,7 @@ func memberAddCommandFunc(cmd *cobra.Command, args []string) {
|
||||
urls := strings.Split(memberPeerURLs, ",")
|
||||
ctx, cancel := commandCtx(cmd)
|
||||
cli := mustClientFromCmd(cmd)
|
||||
resp, err := cli.MemberAdd(ctx, urls)
|
||||
resp, err := cli.MemberAdd(ctx, urls, false)
|
||||
cancel()
|
||||
if err != nil {
|
||||
ExitWithError(ExitError, err)
|
||||
|
||||
Reference in New Issue
Block a user