mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-14 05:17:34 +00:00
fix(eventstore): use decimal, correct mirror (#9905)
back port #9812, #9878, #9881, #9884 --------- Co-authored-by: Livio Spring <livio.a@gmail.com> Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,8 @@ package eventstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
func NewEventstore(querier Querier, pusher Pusher) *EventStore {
|
||||
@@ -30,12 +32,12 @@ type healthier interface {
|
||||
}
|
||||
|
||||
type GlobalPosition struct {
|
||||
Position float64
|
||||
Position decimal.Decimal
|
||||
InPositionOrder uint32
|
||||
}
|
||||
|
||||
func (gp GlobalPosition) IsLess(other GlobalPosition) bool {
|
||||
return gp.Position < other.Position || (gp.Position == other.Position && gp.InPositionOrder < other.InPositionOrder)
|
||||
return gp.Position.LessThan(other.Position) || (gp.Position.Equal(other.Position) && gp.InPositionOrder < other.InPositionOrder)
|
||||
}
|
||||
|
||||
type Reducer interface {
|
||||
|
Reference in New Issue
Block a user