remove events store

This commit is contained in:
Asim Aslam
2020-10-17 10:04:18 +01:00
parent 1ae2ac9020
commit c7f24aa425
9 changed files with 61 additions and 232 deletions

View File

@@ -14,16 +14,11 @@ var (
ErrEncodingMessage = errors.New("Error encoding message")
)
// Stream is an event streaming interface
// Stream is an events streaming interface
type Stream interface {
Publish(topic string, msg interface{}, opts ...PublishOption) error
Subscribe(topic string, opts ...SubscribeOption) (<-chan Event, error)
}
// Store is an event store interface
type Store interface {
Read(topic string, opts ...ReadOption) ([]*Event, error)
Write(event *Event, opts ...WriteOption) error
Consume(topic string, opts ...ConsumeOption) (<-chan Event, error)
String() string
}
type AckFunc func() error