code: func (m *Memberlist) Ping(node string, addr net.Addr) (time.Duration, error) {
  	// Prepare a ping message and setup an ack handler.
  	ping := ping{SeqNo: m.nextSeqNo(), Node: node}
  	ackCh := make(chan ackMessage, m.config.IndirectChecks+1)
  	m.setProbeChannels(ping.SeqNo, ackCh, nil, m.config.ProbeInterval)
  
  	// Send a ping to the node.
  	if err := m.encodeAndSendMsg(addr.String(), pingMsg, &ping); err != nil {
  		return 0, err
  	}
  
  	// Mark the sent time here, which should be after any pre-processing and
  	// system calls to do the actual send. This probably under-reports a bit,
  	// but it's the best we can do.
  	sent := time.Now()
  
  	// Wait for response or timeout.
  	select {
  	case v := <-ackCh:
  		if v.Complete == true {
  			return v.Timestamp.Sub(sent), nil
  		}
  	case <-time.After(m.config.ProbeTimeout):
  		// Timeout, return an error below.
  	}
  
  	m.logger.Printf("[DEBUG] memberlist: Failed UDP ping: %v (timeout reached)", node)
  	return 0, NoPingResponseError{ping.Node}
  }
docs: // Ping initiates a ping to the node with the specified name.