Skip to content

Commit

Permalink
added StreamObject interface
Browse files Browse the repository at this point in the history
  • Loading branch information
OS-M committed Sep 15, 2022
1 parent 6479713 commit 2c3ebf4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/stream_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func (reader *StreamReader) Stop() {
reader.stopSync <- struct{}{}
}

func (reader *StreamReader) ReadNext() (*model.ProximaStreamObject, error) {
func (reader *StreamReader) ReadNext() (model.StreamObject, error) {
select {
case <-reader.outputCtx.Done():
return nil, reader.outputCtx.Err()
Expand Down
7 changes: 7 additions & 0 deletions model/stream_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ package model

import "time"

type StreamObject interface {
GetTimestamp() time.Time
GetUndo() bool
GetTransition() *Transition
GetPreprocess() *TransitionPreprocessingResult
}

type ProximaStreamObject struct {
Transition *Transition `json:"transition"`
Preprocess *TransitionPreprocessingResult
Expand Down

0 comments on commit 2c3ebf4

Please sign in to comment.