github.com/olljanat/moby@v1.13.1/client/swarm_unlock.go (about)

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