Documentation ¶
Index ¶
Constants ¶
View Source
const ( // refer to mongo/bson/bsontypes.h of mongodb kernel 4.0 BsonInvalid = -1 BsonMinKey = 0 BsonTypeNumber = 10 BsonTypeString = 15 BsonTypeOid = 35 BsonMaxKey = 100 )
Variables ¶
View Source
var NsShouldBeIgnore = map[string]bool{ "admin.": true, "local.": true, "config.": true, utils.AppDatabase + ".": true, utils.APPConflictDatabase + ".": true, "system.views": false, }
namespace should be filtered. key: ns, value: true means prefix, false means contain
View Source
var NsShouldNotBeIgnore = map[string]bool{ "admin.$cmd": true, }
namespace should not be filtered. NsShouldNotBeIgnore has a higher priority than NsShouldBeIgnore key: ns, value: true means prefix, false means contain
Functions ¶
func ComputeHash ¶
func ComputeHash(data interface{}) int64
Types ¶
type AutologousFilter ¶
type AutologousFilter struct { }
func (*AutologousFilter) Filter ¶
func (filter *AutologousFilter) Filter(log *oplog.PartialLog) bool
func (*AutologousFilter) FilterNs ¶
func (filter *AutologousFilter) FilterNs(namespace string) bool
type DocFilterChain ¶
type DocFilterChain []DocFilter
func NewDocFilterList ¶
func NewDocFilterList() DocFilterChain
func (DocFilterChain) IterateFilter ¶
func (chain DocFilterChain) IterateFilter(namespace string) bool
type GidFilter ¶
type GidFilter struct {
// contains filtered or unexported fields
}
func NewGidFilter ¶
type MigrateFilter ¶
type MigrateFilter struct { }
func (*MigrateFilter) Filter ¶
func (filter *MigrateFilter) Filter(log *oplog.PartialLog) bool
type NamespaceFilter ¶
type NamespaceFilter struct {
// contains filtered or unexported fields
}
because regexp use the default perl engine which is not support inverse match, so use two rules to match
func NewNamespaceFilter ¶
func NewNamespaceFilter(white, black []string) *NamespaceFilter
func (*NamespaceFilter) Filter ¶
func (filter *NamespaceFilter) Filter(log *oplog.PartialLog) bool
func (*NamespaceFilter) FilterNs ¶
func (filter *NamespaceFilter) FilterNs(namespace string) bool
type NoopFilter ¶
type NoopFilter struct { }
func (*NoopFilter) Filter ¶
func (filter *NoopFilter) Filter(log *oplog.PartialLog) bool
type OplogFilter ¶
type OplogFilter interface {
Filter(log *oplog.PartialLog) bool
}
OplogFilter: AutologousFilter, NamespaceFilter, GidFilter, NoopFilter, DDLFilter
type OplogFilterChain ¶
type OplogFilterChain []OplogFilter
func (OplogFilterChain) IterateFilter ¶
func (chain OplogFilterChain) IterateFilter(log *oplog.PartialLog) bool
type OrphanFilter ¶
type OrphanFilter struct {
// contains filtered or unexported fields
}
func NewOrphanFilter ¶
func NewOrphanFilter(replset string, chunkMap sharding.DBChunkMap) *OrphanFilter
Click to show internal directories.
Click to hide internal directories.