update the code
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 44s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m39s

This commit is contained in:
matst80
2025-11-20 15:27:40 +01:00
parent 874963812f
commit 1c8e9cc974
3 changed files with 64 additions and 5 deletions

View File

@@ -34,14 +34,14 @@ func NewState(registry MutationRegistry) *StateStorage {
var ErrUnknownType = errors.New("unknown type")
func (s *StateStorage) Load(r io.Reader, onMessage func(msg proto.Message)) error {
func (s *StateStorage) Load(r io.Reader, onMessage func(msg proto.Message, timeStamp time.Time)) error {
var err error
var evt *StorageEvent
scanner := bufio.NewScanner(r)
for err == nil {
evt, err = s.Read(scanner)
if err == nil {
onMessage(evt.Mutation)
onMessage(evt.Mutation, evt.TimeStamp)
}
}
if err == io.EOF {