event.go 308 B

1234567891011121314151617181920
  1. package borealis
  2. import (
  3. "reflect"
  4. "time"
  5. "github.com/segmentio/ksuid"
  6. )
  7. type Event struct {
  8. Type uint16
  9. SequentialID uint64
  10. Timestamp time.Time
  11. UniqueID ksuid.KSUID
  12. Payload interface{}
  13. }
  14. func (event Event) Equal(other Event) bool {
  15. return reflect.DeepEqual(event, other)
  16. }