Documentation ¶
Index ¶
- func OnReplayCbNone(seq uint64) error
- type OnReplayCb
- type Player
- func (p *Player) Close()
- func (p *Player) Replay(lmt decoder.Limiter) (uint64, error)
- func (p *Player) ReplayAggregation(agg *schema.TlogAggregation, lmt decoder.Limiter) (uint64, error)
- func (p *Player) ReplayAggregationWithCallback(agg *schema.TlogAggregation, lmt decoder.Limiter, onReplayCb OnReplayCb) (uint64, error)
- func (p *Player) ReplayWithCallback(lmt decoder.Limiter, onReplayCb OnReplayCb) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnReplayCbNone ¶
Types ¶
type OnReplayCb ¶
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
Player defines a tlog replay player. It could be used to restore the data based on transactions sent to tlog server
func NewPlayer ¶
func NewPlayer(ctx context.Context, configPath string, serverConfigs []zerodiskcfg.StorageServerConfig, vdiskID, privKey, hexNonce string, k, m int) (*Player, error)
NewPlayer creates new tlog player
func NewPlayerWithPoolAndBackend ¶
func NewPlayerWithPoolAndBackend(ctx context.Context, pool tlog.RedisPool, backend nbd.Backend, vdiskID, privKey, hexNonce string, k, m int) (*Player, error)
NewPlayerWithPoolAndBackend create new tlog player with given redis pool and nbd backend
func (*Player) Replay ¶
Replay replays the tlog by decoding data from a tlog RedisPool. The replay start from `startTs` timestamp.
func (*Player) ReplayAggregation ¶
func (*Player) ReplayAggregationWithCallback ¶
func (p *Player) ReplayAggregationWithCallback(agg *schema.TlogAggregation, lmt decoder.Limiter, onReplayCb OnReplayCb) (uint64, error)
ReplayAggregation replays an aggregation
func (*Player) ReplayWithCallback ¶
Click to show internal directories.
Click to hide internal directories.