builder

package
v0.0.0-...-27f04c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataDel = iota
	DataAddOrUpdate
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Build(ctx context.Context) error
}

type DataMod

type DataMod int

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) GetIndex

func (mib *MongoIndexBuilder) GetIndex() *index.Indexer

func (*MongoIndexBuilder) InfoStatus

func (mib *MongoIndexBuilder) InfoStatus(s string, t int64)

func (*MongoIndexBuilder) WarnStatus

func (mib *MongoIndexBuilder) WarnStatus(s string, t int64)

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{}
}

type MongoParser

type MongoParser interface {
	Parse([]byte, interface{}) *ParserResult
}

type ParserResult

type ParserResult struct {
	DataMod DataMod
	Value   *document.DocInfo
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL