Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 0fa189d

Browse files
committed
update func call --wait to --sync
1 parent 778c515 commit 0fa189d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

api/client/func.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func (cli *DockerCli) CmdFuncInspect(args ...string) error {
383383
// Usage: hyper func call NAME
384384
func (cli *DockerCli) CmdFuncCall(args ...string) error {
385385
cmd := Cli.Subcmd("func call", []string{"NAME"}, "Call a function", false)
386-
wait := cmd.Bool([]string{"-wait"}, false, "Block until the call is completed")
386+
sync := cmd.Bool([]string{"-sync"}, false, "Block until the call is completed")
387387

388388
cmd.Require(flag.Exact, 1)
389389
if err := cmd.ParseFlags(args, true); err != nil {
@@ -400,13 +400,13 @@ func (cli *DockerCli) CmdFuncCall(args ...string) error {
400400
}
401401
}
402402

403-
body, err := cli.client.FuncCall(context.Background(), name, stdin, *wait)
403+
body, err := cli.client.FuncCall(context.Background(), name, stdin, *sync)
404404
if err != nil {
405405
return err
406406
}
407407
defer body.Close()
408408

409-
if *wait {
409+
if *sync {
410410
_, err = io.Copy(cli.out, body)
411411
return err
412412
}

vendor/src/github.com/docker/engine-api/client/func.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,14 @@ func (cli *Client) FuncInspectWithCallId(ctx context.Context, id string) (*types
182182
return &fn, err
183183
}
184184

185-
func (cli *Client) FuncCall(ctx context.Context, name string, stdin io.Reader, wait bool) (io.ReadCloser, error) {
185+
func (cli *Client) FuncCall(ctx context.Context, name string, stdin io.Reader, sync bool) (io.ReadCloser, error) {
186186
fn, _, err := cli.FuncInspectWithRaw(ctx, name)
187187
if err != nil {
188188
return nil, err
189189
}
190190
subpath := ""
191-
if wait {
192-
subpath += "/wait"
191+
if sync {
192+
subpath += "/sync"
193193
}
194194
req, err := newFuncEndpointRequest("POST", path.Join("call", name, fn.UUID, subpath), nil, stdin)
195195
if err != nil {

vendor/src/github.com/docker/engine-api/client/interface.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ type APIClient interface {
126126
FuncList(ctx context.Context, opts types.FuncListOptions) ([]types.Func, error)
127127
FuncInspect(ctx context.Context, name string) (types.Func, error)
128128
FuncInspectWithRaw(ctx context.Context, name string) (types.Func, []byte, error)
129-
FuncCall(ctx context.Context, name string, stdin io.Reader, wait bool) (io.ReadCloser, error)
129+
FuncCall(ctx context.Context, name string, stdin io.Reader, sync bool) (io.ReadCloser, error)
130130
FuncGet(ctx context.Context, callId string, wait bool) (io.ReadCloser, error)
131131
FuncLogs(ctx context.Context, name, callId string, follow bool, tail string) (io.ReadCloser, error)
132132
FuncStatus(ctx context.Context, name string) (*types.FuncStatusResponse, error)

0 commit comments

Comments
 (0)