code: func (c *cluster) ReceiveEvent(e *NodeEvent) (err error) {
  	// Ignore events sent from this node.
  	if e.Node.ID == c.Node.ID {
  		return nil
  	}
  
  	switch e.Event {
  	case NodeJoin:
  		c.logger.Debugf("nodeJoin of %s on %s", e.Node.URI, c.Node.URI)
  		// Ignore the event if this is not the coordinator.
  		if !c.isCoordinator() {
  			return nil
  		}
  		return c.nodeJoin(e.Node)
  	case NodeLeave:
  		c.mu.Lock()
  		defer c.mu.Unlock()
  		if c.unprotectedIsCoordinator() {
  			c.logger.Printf("received node leave: %v", e.Node)
  			// if removeNodeBasicSorted succeeds, that means that the node was
  			// not already removed by a removeNode request. We treat this as the
  			// host being temporarily unavailable, and expect it to come back
  			// up.
  			if c.removeNodeBasicSorted(e.Node.ID) {
  				c.Topology.nodeStates[e.Node.ID] = nodeStateDown
  				// put the cluster into STARTING if we've lost a number of nodes
  				// equal to or greater than ReplicaN
  				err = c.unprotectedSetStateAndBroadcast(c.determineClusterState())
  			}
  		}
  	case NodeUpdate:
  		c.logger.Printf("received node update event: id: %v, string: %v, uri: %v", e.Node.ID, e.Node.String(), e.Node.URI)
  		// NodeUpdate is intentionally not implemented.
  	}
  
  	return err
  }
docs: // ReceiveEvent represents an implementation of EventHandler.