Documentation
¶
Index ¶
- Constants
- Variables
- func RetryWithTimeout(timeoutDuration time.Duration, fn func() (shouldReturn bool)) error
- type Config
- type LogServiceClientFactory
- type LogServiceDriver
- func (d *LogServiceDriver) Append(e *entry.Entry) error
- func (d *LogServiceDriver) Close() error
- func (d *LogServiceDriver) GetTruncated() (lsn uint64, err error)
- func (info LogServiceDriver) IsReplaying() bool
- func (info LogServiceDriver) PostReplay()
- func (info LogServiceDriver) PreReplay()
- func (d *LogServiceDriver) Read(drlsn uint64) (*entry.Entry, error)
- func (d *LogServiceDriver) Replay(h driver.ApplyHandle) error
- func (d *LogServiceDriver) Truncate(lsn uint64) error
- type MetaType
- type ReplayCmd
Constants ¶
View Source
const (
ReplayReadSize = common.M * 2
)
Variables ¶
View Source
var DefaultReadMaxSize = uint64(10)
View Source
var ErrAllRecordsRead = moerr.NewInternalError("driver read cache: all records are read")
View Source
var ErrClientPoolClosed = moerr.NewInternalError("client pool closed")
View Source
var ErrDriverLsnNotFound = moerr.NewInternalError("driver info: driver lsn not found")
View Source
var ErrNoClientAvailable = moerr.NewInternalError("no client available")
View Source
var ErrRecordNotFound = moerr.NewInternalError("driver read cache: lsn not found")
View Source
var ErrRetryTimeOut = moerr.NewInternalError("driver info: retry time out")
View Source
var ErrTooMuchPenddings = moerr.NewInternalError("too much penddings")
Functions ¶
Types ¶
type Config ¶
type Config struct {
ClientPoolMaxSize int
ClientPoolInitSize int
GetClientRetryTimeOut time.Duration
RecordSize int
ReadCacheSize int
AppenderMaxCount int
ReadMaxSize uint64
NewRecordSize int
NewClientDuration time.Duration
ClientAppendDuration time.Duration
TruncateDuration time.Duration
// AppendFrequency time.Duration
RetryTimeout time.Duration
GetTruncateDuration time.Duration
ReadDuration time.Duration
ClientFactory LogServiceClientFactory
}
func NewDefaultConfig ¶
func NewDefaultConfig(clientFactory LogServiceClientFactory) *Config
func NewTestConfig ¶
func NewTestConfig(ccfg *logservice.ClientConfig) *Config
type LogServiceClientFactory ¶
type LogServiceClientFactory logservice.ClientFactory
type LogServiceDriver ¶
type LogServiceDriver struct {
// contains filtered or unexported fields
}
func NewLogServiceDriver ¶
func NewLogServiceDriver(cfg *Config) *LogServiceDriver
func (*LogServiceDriver) Close ¶
func (d *LogServiceDriver) Close() error
func (*LogServiceDriver) GetTruncated ¶
func (d *LogServiceDriver) GetTruncated() (lsn uint64, err error)
func (LogServiceDriver) IsReplaying ¶
func (info LogServiceDriver) IsReplaying() bool
func (LogServiceDriver) PostReplay ¶
func (info LogServiceDriver) PostReplay()
func (*LogServiceDriver) Replay ¶
func (d *LogServiceDriver) Replay(h driver.ApplyHandle) error
func (*LogServiceDriver) Truncate ¶
func (d *LogServiceDriver) Truncate(lsn uint64) error
driver lsn -> entry lsn
type ReplayCmd ¶
type ReplayCmd struct {
// contains filtered or unexported fields
}
func NewEmptyReplayCmd ¶
func NewEmptyReplayCmd() *ReplayCmd
func NewReplayCmd ¶
Click to show internal directories.
Click to hide internal directories.