Documentation ¶
Index ¶
- Constants
- Variables
- func FlushCheckpoint(ckptMap map[string]bson.MongoTimestamp) error
- func GenerateCollExecutorId() int
- func GenerateDocExecutorId() int
- func GetAllNamespace(sources []*utils.MongoSource) (map[utils.NS]bool, error)
- func IsShardingToSharding(fromIsSharding bool, toConn *utils.MongoConn) bool
- func LoadCheckpoint() (map[string]bson.MongoTimestamp, error)
- func StartDropDestCollection(nsSet map[utils.NS]bool, toConn *utils.MongoConn, ...) (map[string]bool, error)
- func StartIndexSync(indexMap map[utils.NS][]mgo.Index, toUrl string, nsExistedSet map[string]bool, ...) (syncError error)
- func StartNamespaceSpecSyncForSharding(csUrl string, toConn *utils.MongoConn, nsExistedSet map[string]bool, ...) error
- type CollectionExecutor
- type DBSyncer
- type DocExecutor
- type DocumentReader
Constants ¶
View Source
const (
MAX_BUFFER_BYTE_SIZE = 16 * 1024 * 1024
)
Variables ¶
View Source
var GlobalCollExecutorId int32 = -1
View Source
var GlobalDocExecutorId int32 = -1
Functions ¶
func FlushCheckpoint ¶
func FlushCheckpoint(ckptMap map[string]bson.MongoTimestamp) error
func GenerateCollExecutorId ¶
func GenerateCollExecutorId() int
func GenerateDocExecutorId ¶
func GenerateDocExecutorId() int
func GetAllNamespace ¶
func IsShardingToSharding ¶
func LoadCheckpoint ¶
func LoadCheckpoint() (map[string]bson.MongoTimestamp, error)
func StartDropDestCollection ¶
func StartIndexSync ¶
Types ¶
type CollectionExecutor ¶
type CollectionExecutor struct {
// contains filtered or unexported fields
}
func NewCollectionExecutor ¶
func NewCollectionExecutor(id int, mongoUrl string, ns utils.NS) *CollectionExecutor
func (*CollectionExecutor) Start ¶
func (colExecutor *CollectionExecutor) Start() error
func (*CollectionExecutor) Sync ¶
func (colExecutor *CollectionExecutor) Sync(docs []*bson.Raw)
func (*CollectionExecutor) Wait ¶
func (colExecutor *CollectionExecutor) Wait() error
type DBSyncer ¶
type DBSyncer struct { // source mongodb url FromMongoUrl string // destination mongodb url ToMongoUrl string // contains filtered or unexported fields }
func NewDBSyncer ¶
func NewDBSyncer( replset string, fromMongoUrl string, toMongoUrl string, nsTrans *transform.NamespaceTransform, orphanFilter *filter.OrphanFilter) *DBSyncer
func (*DBSyncer) GetIndexMap ¶
type DocExecutor ¶
type DocExecutor struct {
// contains filtered or unexported fields
}
func NewDocExecutor ¶
func NewDocExecutor(id int, colExecutor *CollectionExecutor, session *mgo.Session) *DocExecutor
type DocumentReader ¶
type DocumentReader struct {
// contains filtered or unexported fields
}
func NewDocumentReader ¶
func NewDocumentReader(src string, ns utils.NS) *DocumentReader
NewDocumentReader creates reader with mongodb url
func (*DocumentReader) Close ¶
func (reader *DocumentReader) Close()
func (*DocumentReader) GetIndexes ¶
func (reader *DocumentReader) GetIndexes() ([]mgo.Index, error)
Click to show internal directories.
Click to hide internal directories.