blob: b17fab0135c4dc7995f2cf8a2fbeb3c2deeb9892 [file] [log] [blame]
giolekvaf89e0462020-05-02 17:47:06 +04001package events
2
3type EventState string
4
giolekvaede6d2b2020-05-05 22:14:16 +04005// TODO(giolekva): add FAILED
giolekvaf89e0462020-05-02 17:47:06 +04006const (
7 EventStateNew EventState = "NEW"
8 EventStateProcessing EventState = "PROCESSING"
9 EventStateDone EventState = "DONE"
10)
11
12type Event struct {
13 Id string
14 State EventState
15 NodeId string
16}
17
18type EventStore interface {
19 GetEventsInState(state EventState) ([]Event, error)
giolekvaede6d2b2020-05-05 22:14:16 +040020 MarkEventDone(event Event) error
giolekvaf89e0462020-05-02 17:47:06 +040021}