func (s *SQLEngine) ConsumeMessage(m gregor.Message) (time.Time, error) { switch { case m.ToInBandMessage() != nil: return s.consumeInBandMessage(m.ToInBandMessage()) default: return time.Time{}, nil } }
func (m *MemEngine) ConsumeMessage(msg gregor.Message) (time.Time, error) { m.Lock() defer m.Unlock() switch { case msg.ToInBandMessage() != nil: return m.consumeInBandMessage(gregor.UIDFromMessage(msg), msg.ToInBandMessage()) default: return m.clock.Now(), nil } }