github.com/kinvolk/docker@v1.13.1/client/node_remove.go (about)

     1  package client
     2  
     3  import (
     4  	"net/url"
     5  
     6  	"github.com/docker/docker/api/types"
     7  
     8  	"golang.org/x/net/context"
     9  )
    10  
    11  // NodeRemove removes a Node.
    12  func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error {
    13  	query := url.Values{}
    14  	if options.Force {
    15  		query.Set("force", "1")
    16  	}
    17  
    18  	resp, err := cli.delete(ctx, "/nodes/"+nodeID, query, nil)
    19  	ensureReaderClosed(resp)
    20  	return err
    21  }