Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AckDetail ¶
type AckDetail struct { Timestamp uint64 LastConfirmedMessageID message.MessageID IsSync bool Err error }
AckDetail records the information of acker.
type AckManager ¶
type AckManager struct {
// contains filtered or unexported fields
}
AckManager manages the timestampAck.
func NewAckManager ¶
func NewAckManager() *AckManager
NewAckManager creates a new timestampAckHelper.
func (*AckManager) AdvanceLastConfirmedMessageID ¶
func (ta *AckManager) AdvanceLastConfirmedMessageID(msgID message.MessageID)
AdvanceLastConfirmedMessageID update the last confirmed message id.
func (*AckManager) Allocate ¶
func (ta *AckManager) Allocate(ctx context.Context) (*Acker, error)
Allocate allocates a timestamp. Concurrent safe to call with Sync and Allocate.
func (*AckManager) SyncAndGetAcknowledged ¶
func (ta *AckManager) SyncAndGetAcknowledged(ctx context.Context) ([]*AckDetail, error)
SyncAndGetAcknowledged syncs the ack records with allocator, and get the last all acknowledged info. Concurrent safe to call with Allocate.
type AckOption ¶
type AckOption func(*AckDetail)
AckOption is the option for acker.
type Acker ¶
type Acker struct {
// contains filtered or unexported fields
}
Acker records the timestamp and last confirmed message id that has not been acknowledged.
func (*Acker) LastConfirmedMessageID ¶
LastConfirmedMessageID returns the last confirmed message id.
Click to show internal directories.
Click to hide internal directories.