Documentation
¶
Index ¶
Constants ¶
View Source
const ( MONGO_DB_NAME string = "local" MONGO_COLLECTION string = "oplog.rs" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileReader ¶
type FileReader struct {
FilePath string
}
FileReader implements the OplogReader interface for reading Oplog entries from a file.
func (*FileReader) ReadOplogs ¶
func (fr *FileReader) ReadOplogs(ctx context.Context, publisher domain.OplogPublisher) error
ReadOplogs reads Oplog entries from the file and publish them in the publisher.
type MongoReader ¶
type MongoReader struct {
ConnectionString string
}
MongoReader implements the OplogReader interface for reading Oplog entries from a running MongoDB instance.
func (*MongoReader) ReadOplogs ¶
func (mr *MongoReader) ReadOplogs(ctx context.Context, publisher domain.OplogPublisher) error
ReadOplogs reads Oplog entries from the file and publish them in the publisher.
type OplogReader ¶
type OplogReader interface {
ReadOplogs(ctx context.Context, publisher domain.OplogPublisher) error
}
OplogReader defines the interface for reading Oplog entries and storing them in the publisher.
func NewFileReader ¶
func NewFileReader(filePath string) OplogReader
NewFileReader creates a new instance of FileReader.
func NewMongoReader ¶
func NewMongoReader(connectionStr string) OplogReader
NewMongoReader creates a new instance of FileReader.
Click to show internal directories.
Click to hide internal directories.