swarm_unlock.go 334 B

12345678910111213
  1. package client
  2. import (
  3. "github.com/docker/docker/api/types/swarm"
  4. "golang.org/x/net/context"
  5. )
  6. // SwarmUnlock unlocks locked swarm.
  7. func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error {
  8. serverResp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil)
  9. ensureReaderClosed(serverResp)
  10. return err
  11. }