code: func (api *API) SetCoordinator(ctx context.Context, id string) (oldNode, newNode *Node, err error) {
  	span, _ := tracing.StartSpanFromContext(ctx, "API.SetCoordinator")
  	defer span.Finish()
  
  	if err := api.validate(apiSetCoordinator); err != nil {
  		return nil, nil, errors.Wrap(err, "validating api method")
  	}
  
  	oldNode = api.cluster.nodeByID(api.cluster.Coordinator)
  	newNode = api.cluster.nodeByID(id)
  	if newNode == nil {
  		return nil, nil, errors.Wrap(ErrNodeIDNotExists, "getting new node")
  	}
  
  	// If the new coordinator is this node, do the SetCoordinator directly.
  	if newNode.ID == api.Node().ID {
  		return oldNode, newNode, api.cluster.setCoordinator(newNode)
  	}
  
  	// Send the set-coordinator message to new node.
  	err = api.server.SendTo(
  		newNode,
  		&SetCoordinatorMessage{
  			New: newNode,
  		})
  	if err != nil {
  		return nil, nil, fmt.Errorf("problem sending SetCoordinator message: %s", err)
  	}
  	return oldNode, newNode, nil
  }
docs: // SetCoordinator makes a new Node the cluster coordinator.