code: func (r *messageRing) Enqueue(m *Message) error {
  	mSize := int64(len(m.Line))
  
  	r.mu.Lock()
  	if r.closed {
  		r.mu.Unlock()
  		return errClosed
  	}
  	if mSize+r.sizeBytes > r.maxBytes && len(r.queue) > 0 {
  		r.wait.Signal()
  		r.mu.Unlock()
  		return nil
  	}
  
  	r.queue = append(r.queue, m)
  	r.sizeBytes += mSize
  	r.wait.Signal()
  	r.mu.Unlock()
  	return nil
  }
docs: // Enqueue adds a message to the buffer queue
  // If the message is too big for the buffer it drops the new message.
  // If there are no messages in the queue and the message is still too big, it adds the message anyway.