mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
committed by
Aaron Lehmann
parent
472ecae0d8
commit
b4a667c8c4
17
client/swarm_unlock.go
Normal file
17
client/swarm_unlock.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/api/types/swarm"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// SwarmUnlock unlockes locked swarm.
|
||||
func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error {
|
||||
serverResp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ensureReaderClosed(serverResp)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user