es

package
v0.0.0-...-0b57644 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ES查询单页数量,超过限制的需要滚动
	RESULT_WINDOW_SIZE = 5000
	//ES分页查询结果集生存时间,每次滚动会刷新一下
	SCROLL_TIME = time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Elastic

type Elastic struct {
	// contains filtered or unexported fields
}
var (
	ESClient *Elastic
)

func InitESClient

func InitESClient(cluster []string, username string, password string) (*Elastic, error)

@title 初始化ES连接客户端 @description 连接ES的全局客户端变量 @auth 王敩 2020-07-25

func (*Elastic) Client

func (e *Elastic) Client() *elasticsearch.Client

Jump to

Keyboard shortcuts

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