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) GetCurrSeqNum() uint64
- 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 = mpool.MB * 64 MaxReadSize = mpool.MB * 64 )
View Source
const ( IOET_WALRecord_V1 uint16 = 1 IOET_WALRecord uint16 = 1000 IOET_WALRecord_CurrVer = IOET_WALRecord_V1 )
Variables ¶
View Source
var DefaultReadMaxSize = uint64(10)
View Source
var ErrAllRecordsRead = moerr.NewInternalErrorNoCtx("driver read cache: all records are read")
View Source
var ErrClientPoolClosed = moerr.NewInternalErrorNoCtx("client pool closed")
View Source
var ErrDriverLsnNotFound = moerr.NewInternalErrorNoCtx("driver info: driver lsn not found")
View Source
var ErrNoClientAvailable = moerr.NewInternalErrorNoCtx("no client available")
View Source
var ErrRecordNotFound = moerr.NewInternalErrorNoCtx("driver read cache: lsn not found")
View Source
var ErrRetryTimeOut = moerr.NewInternalErrorNoCtx("driver info: retry time out")
View Source
var ErrTooMuchPenddings = moerr.NewInternalErrorNoCtx("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) GetCurrSeqNum ¶ added in v0.7.0
func (d *LogServiceDriver) GetCurrSeqNum() uint64
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.