Documentation
¶
Index ¶
- Constants
- type BuildInfo
- type Builder
- type DataMod
- type MongoIndexBuilder
- func (mib *MongoIndexBuilder) Build(ctx context.Context, name string) error
- func (mib *MongoIndexBuilder) GetBuilderInfo() *BuildInfo
- func (mib *MongoIndexBuilder) GetIndex() index.Index
- func (mib *MongoIndexBuilder) Info(s string, d time.Duration) string
- func (mib *MongoIndexBuilder) InfoStatus(s string, d time.Duration)
- func (mib *MongoIndexBuilder) WarnStatus(s string, d time.Duration)
- type MongoIndexManagerOps
- type MongoParser
- type ParserResult
Constants ¶
View Source
const ( DataDel = iota DataAddOrUpdate )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildInfo ¶ added in v0.0.11
type BuildInfo struct {
TotalNumber int64 `json:"total_num"`
ErrorNumber int64 `json:"error_num"`
AddNum int64 `json:"add_num,"`
DeleteNum int64 `json:"delete_num,"`
MergeTime time.Duration `json:"merge_time,"`
LastBaseUpdated time.Time `json:"last_base_updated,omitempty"`
LastIncUpdated time.Time `json:"last_inc_updated,omitempty"`
IndexInfo *index.IndexInfo `json:"index_info,omitempty"`
}
type MongoIndexBuilder ¶
type MongoIndexBuilder struct {
// contains filtered or unexported fields
}
func NewMongoIndexBuilder ¶
func NewMongoIndexBuilder(ops *MongoIndexManagerOps) (*MongoIndexBuilder, error)
func (*MongoIndexBuilder) Build ¶
func (mib *MongoIndexBuilder) Build(ctx context.Context, name string) error
func (*MongoIndexBuilder) GetBuilderInfo ¶ added in v0.0.11
func (mib *MongoIndexBuilder) GetBuilderInfo() *BuildInfo
func (*MongoIndexBuilder) GetIndex ¶
func (mib *MongoIndexBuilder) GetIndex() index.Index
func (*MongoIndexBuilder) Info ¶ added in v0.0.9
func (mib *MongoIndexBuilder) Info(s string, d time.Duration) string
func (*MongoIndexBuilder) InfoStatus ¶
func (mib *MongoIndexBuilder) InfoStatus(s string, d time.Duration)
func (*MongoIndexBuilder) WarnStatus ¶
func (mib *MongoIndexBuilder) WarnStatus(s string, d time.Duration)
type MongoIndexManagerOps ¶
type MongoIndexManagerOps struct {
Name string
IncInterval int
BaseInterval int
URI string
DB string
Collection string
ConnectTimeout int
ReadTimeout int
BaseParser MongoParser
IncParser MongoParser
BaseQuery interface{}
IncQuery interface{}
UserData interface{}
FindOpt *options.FindOptions
Logger log.Logger
OnBeforeBase func(interface{}) interface{}
OnBeforeInc func(interface{}) interface{}
OnFinishBase func(interface{})
OnFinishInc func(interface{})
}
type MongoParser ¶
type MongoParser interface {
Parse([]byte, interface{}) *ParserResult
}
type ParserResult ¶
Click to show internal directories.
Click to hide internal directories.