code: func (s *messageStoreImpl) Add(message interface{}) bool {
  	s.lock.Lock()
  	defer s.lock.Unlock()
  
  	n := len(s.messages)
  	for i := 0; i < n; i++ {
  		m := s.messages[i]
  		switch s.pol(message, m.data) {
  		case common.MessageInvalidated:
  			return false
  		case common.MessageInvalidates:
  			s.invTrigger(m.data)
  			s.messages = append(s.messages[:i], s.messages[i+1:]...)
  			n--
  			i--
  		}
  	}
  
  	s.messages = append(s.messages, &msg{data: message, created: time.Now()})
  	return true
  }
docs: // add adds a message to the store