Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientProgress ¶
type ClientProgress struct {
// contains filtered or unexported fields
}
ClientProgress tracks watermarks for all the clients.
func FromPb ¶
func FromPb(pb *commonpb.ClientProgress, logger logging.Logger) *ClientProgress
func NewClientProgress ¶
func NewClientProgress(logger logging.Logger) *ClientProgress
func (*ClientProgress) GarbageCollect ¶
func (cp *ClientProgress) GarbageCollect() map[t.ClientID]t.ReqNo
func (*ClientProgress) LoadPb ¶
func (cp *ClientProgress) LoadPb(pb *commonpb.ClientProgress)
func (*ClientProgress) Pb ¶
func (cp *ClientProgress) Pb() *commonpb.ClientProgress
type DeliveredReqs ¶
type DeliveredReqs struct {
// contains filtered or unexported fields
}
DeliveredReqs tracks the watermarks of delivered transactions for a single client.
func DeliveredReqsFromPb ¶
func DeliveredReqsFromPb(pb *commonpb.DeliveredReqs, logger logging.Logger) *DeliveredReqs
func EmptyDeliveredReqs ¶
func EmptyDeliveredReqs(logger logging.Logger) *DeliveredReqs
EmptyDeliveredReqs allocates and returns a new DeliveredReqs.
func (*DeliveredReqs) Add ¶
func (dr *DeliveredReqs) Add(reqNo t.ReqNo) bool
Add adds a request number that is considered delivered to the DeliveredReqs. Returns true if the request number has been added now (after not being previously present). Returns false if the request number has already been added before the call to Add.
func (*DeliveredReqs) GarbageCollect ¶
func (dr *DeliveredReqs) GarbageCollect() t.ReqNo
GarbageCollect reduces the memory footprint of the DeliveredReqs by deleting a contiguous prefix of delivered request numbers and increasing the low watermark accordingly. Returns the new low watermark.
func (*DeliveredReqs) Pb ¶
func (dr *DeliveredReqs) Pb() *commonpb.DeliveredReqs