code: func (s *Serf) UserEvent(name string, payload []byte, coalesce bool) error {
  	payloadSizeBeforeEncoding := len(name)+len(payload)
  
  	// Check size before encoding to prevent needless encoding and return early if it's over the specified limit.
  	if payloadSizeBeforeEncoding > s.config.UserEventSizeLimit {
  		return fmt.Errorf(
  			"user event exceeds configured limit of %d bytes before encoding",
  			s.config.UserEventSizeLimit,
  		)
  	}
  
  	if payloadSizeBeforeEncoding > UserEventSizeLimit {
  		return fmt.Errorf(
  			"user event exceeds sane limit of %d bytes before encoding",
  			UserEventSizeLimit,
  		)
  	}
  
  	// Create a message
  	msg := messageUserEvent{
  		LTime:   s.eventClock.Time(),
  		Name:    name,
  		Payload: payload,
  		CC:      coalesce,
  	}
  
  	// Start broadcasting the event
  	raw, err := encodeMessage(messageUserEventType, &msg)
  	if err != nil {
  		return err
  	}
  
  	// Check the size after encoding to be sure again that
  	// we're not attempting to send over the specified size limit.
  	if len(raw) > s.config.UserEventSizeLimit {
  		return fmt.Errorf(
  			"encoded user event exceeds configured limit of %d bytes after encoding",
  			s.config.UserEventSizeLimit,
  		)
  	}
  
  	if len(raw) > UserEventSizeLimit {
  		return fmt.Errorf(
  			"encoded user event exceeds sane limit of %d bytes before encoding",
  			UserEventSizeLimit,
  		)
  	}
  
  	s.eventClock.Increment()
  
  	// Process update locally
  	s.handleUserEvent(&msg)
  
  	s.eventBroadcasts.QueueBroadcast(&broadcast{
  		msg: raw,
  	})
  	return nil
  }
docs: // UserEvent is used to broadcast a custom user event with a given
  // name and payload. If the configured size limit is exceeded and error will be returned.
  // If coalesce is enabled, nodes are allowed to coalesce this event.
  // Coalescing is only available starting in v0.2