code: func (buffer *InfiniteBuffer) CopyEvents(event *events.Message) {
  	if event.ID == "" || event.Type != containerTypeEvent {
  		return
  	}
  
  	// Only add the events agent is interested
  	for _, containerEvent := range containerEvents {
  		if event.Status == containerEvent {
  			buffer.lock.Lock()
  			defer buffer.lock.Unlock()
  
  			buffer.events = append(buffer.events, event)
  			// Check if there is consumer waiting for events
  			if buffer.empty {
  				buffer.empty = false
  
  				// Unblock the consumer
  				buffer.waitForEvent.Done()
  			}
  			return
  		}
  	}
  }
docs: // CopyEvents copies the event into the buffer