code: func (m *Memberlist) gossip() {
  	defer metrics.MeasureSince([]string{"memberlist", "gossip"}, time.Now())
  
  	// Get some random live, suspect, or recently dead nodes
  	m.nodeLock.RLock()
  	kNodes := kRandomNodes(m.config.GossipNodes, m.nodes, func(n *nodeState) bool {
  		if n.Name == m.config.Name {
  			return true
  		}
  
  		switch n.State {
  		case stateAlive, stateSuspect:
  			return false
  
  		case stateDead:
  			return time.Since(n.StateChange) > m.config.GossipToTheDeadTime
  
  		default:
  			return true
  		}
  	})
  	m.nodeLock.RUnlock()
  
  	// Compute the bytes available
  	bytesAvail := m.config.UDPBufferSize - compoundHeaderOverhead
  	if m.config.EncryptionEnabled() {
  		bytesAvail -= encryptOverhead(m.encryptionVersion())
  	}
  
  	for _, node := range kNodes {
  		// Get any pending broadcasts
  		msgs := m.getBroadcasts(compoundOverhead, bytesAvail)
  		if len(msgs) == 0 {
  			return
  		}
  
  		addr := node.Address()
  		if len(msgs) == 1 {
  			// Send single message as is
  			if err := m.rawSendMsgPacket(addr, &node.Node, msgs[0]); err != nil {
  				m.logger.Printf("[ERR] memberlist: Failed to send gossip to %s: %s", addr, err)
  			}
  		} else {
  			// Otherwise create and send a compound message
  			compound := makeCompoundMessage(msgs)
  			if err := m.rawSendMsgPacket(addr, &node.Node, compound.Bytes()); err != nil {
  				m.logger.Printf("[ERR] memberlist: Failed to send gossip to %s: %s", addr, err)
  			}
  		}
  	}
  }
docs: // gossip is invoked every GossipInterval period to broadcast our gossip
  // messages to a few random nodes.