es

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc

type Doc interface {
	Index() string
	ID() string
}

Doc es doc 对象

type ES

type ES struct {
	// contains filtered or unexported fields
}

ES simple wrapper of github.com/olivere/elastic/v7

func NewES

func NewES(debug bool, hosts ...string) (*ES, error)

NewES return a New ES instance

func (*ES) BulkProcess

func (es *ES) BulkProcess(ctx context.Context, ch <-chan Doc, batch, worker int) (err error)

BulkProcess start a bulk process

func (*ES) Client

func (es *ES) Client() *elastic.Client

Client return an elastic.Client

Jump to

Keyboard shortcuts

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