clientv3: support MemberAdd for learner

Added IsLearner flag to clientv3 MemberAdd API.
This commit is contained in:
Jingyi Hu
2019-03-19 17:22:15 -07:00
parent 604bc04f70
commit fc14608cb7
7 changed files with 60 additions and 11 deletions

View File

@@ -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)