Documentation ¶
Index ¶
- func EnsureRunIdStore(root, runId string) error
- func ExistReplId(root, id string) bool
- func MkdirIfNoExist(dir string) error
- type AofReader
- type AofRotateReader
- type AofRotater
- type AofWriter
- type Observer
- type RdbFile
- type RdbReader
- type RdbWriter
- type Reader
- type Storer
- func (s *Storer) Close() error
- func (s *Storer) DelRunId(id string) error
- func (s *Storer) GetAofWritter(r io.Reader, offset int64) (*AofWriter, error)
- func (s *Storer) GetOffsetRange() (int64, int64)
- func (s *Storer) GetRdb() (int64, int64)
- func (s *Storer) GetRdbWriter(r io.Reader, offset int64, rdbSize int64) (*RdbWriter, error)
- func (s *Storer) GetReader(offset int64, verifyCrc bool) (*Reader, error)
- func (s *Storer) IsValidOffset(offset int64) bool
- func (s *Storer) LatestOffset() int64
- func (s *Storer) RunId() string
- func (s *Storer) SetRunId(new string) error
- func (s *Storer) VerifyRunId(ids []string) (offset int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureRunIdStore ¶
func ExistReplId ¶
func MkdirIfNoExist ¶
Types ¶
type AofReader ¶
type AofReader struct {
// contains filtered or unexported fields
}
func NewAofReader ¶
type AofRotateReader ¶
type AofRotateReader struct {
// contains filtered or unexported fields
}
func NewAofRotateReader ¶
func NewAofRotateReader(dir string, offset int64, aof aofStorer, writer io.WriteCloser, verifyCrc bool) (*AofRotateReader, error)
func (*AofRotateReader) Close ¶
func (r *AofRotateReader) Close() error
func (*AofRotateReader) Seek ¶
func (r *AofRotateReader) Seek(offset int64) error
offset is a logical offset
func (*AofRotateReader) SetObserver ¶
func (r *AofRotateReader) SetObserver(obr Observer)
func (*AofRotateReader) Start ¶
func (r *AofRotateReader) Start()
type AofRotater ¶
type AofRotater struct { Id string // contains filtered or unexported fields }
AofRotater it is not thread safe,
func NewAofRotater ¶
func NewAofRotater(id string, dir string, offset int64, maxLogSize int64, flush config.FlushPolicy) (*AofRotater, error)
type AofWriter ¶
type AofWriter struct { *AofRotater // contains filtered or unexported fields }
func NewAofWriter ¶
func (*AofWriter) SetObserver ¶
type Observer ¶
type Observer interface { Open(args ...interface{}) Close(args ...interface{}) Write(args ...interface{}) Read(args ...interface{}) }
type RdbFile ¶
type RdbFile struct {
// contains filtered or unexported fields
}
func ParseRdbFile ¶
type RdbReader ¶
type RdbReader struct {
// contains filtered or unexported fields
}
func NewRdbReader ¶
func NewRdbReaderFromFile ¶ added in v1.0.0
func (*RdbReader) SetObserver ¶
type RdbWriter ¶
type RdbWriter struct {
// contains filtered or unexported fields
}
func NewRdbWriter ¶
func NewRdbWriter(id string, r io.Reader, rdbDir string, offset int64, rdbSize int64) (*RdbWriter, error)
rdb name : sourceDir/$runId/$rdbDir/$offset_size.rdb
func (*RdbWriter) SetObserver ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) Start ¶
func (r *Reader) Start(wait usync.WaitCloser)
type Storer ¶
type Storer struct { Id string // contains filtered or unexported fields }
func (*Storer) GetAofWritter ¶
func (*Storer) GetOffsetRange ¶
func (*Storer) GetRdbWriter ¶
func (*Storer) GetReader ¶
for a rdb writer, Reader returns io.EOF when data has been drained for a aof writer, it's endless unless encounter an error
func (*Storer) IsValidOffset ¶
func (*Storer) LatestOffset ¶
Click to show internal directories.
Click to hide internal directories.