Documentation ¶
Index ¶
- Variables
- type Buffer
- func (b *Buffer) Add(block *schema.TlogBlock)
- func (b *Buffer) LastFlushed() uint64
- func (b *Buffer) NeedResend(seq uint64) bool
- func (b *Buffer) SetFlushed(seqs []uint64)
- func (b *Buffer) SetResendAll()
- func (b *Buffer) SetSent(seq uint64)
- func (b *Buffer) TimedOut(ctx context.Context) <-chan *schema.TlogBlock
- type Uint64Slice
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRetryExceeded = errors.New("retry exceeded")
)
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer defines buffer of tlog blocks that already sent but still waiting for: - to be succesfully received by the server - to be flushed
func (*Buffer) LastFlushed ¶
LastFlushed returns last sequence flushed
func (*Buffer) NeedResend ¶
NeedResend returns true if this sequence need to be re-send
func (*Buffer) SetFlushed ¶
SetFlushed set this sequence as succesfully flushed
func (*Buffer) SetResendAll ¶
func (b *Buffer) SetResendAll()
SetResendAll resets this buffer, make all blocks need to be resend right now
type Uint64Slice ¶
type Uint64Slice []uint64
Uint64Slice implements sort interface for buffer.seqToTimeout
func (Uint64Slice) Len ¶
func (us Uint64Slice) Len() int
func (Uint64Slice) Less ¶
func (us Uint64Slice) Less(i, j int) bool
func (Uint64Slice) Swap ¶
func (us Uint64Slice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.