Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Hosts          string // 多个用逗号隔开: http://node01:9200,http://node02:9200,http://node03:9200
	RequestTimeout int    // 秒
}

type Elastic

type Elastic struct {
	Client *elastic.Client
	// contains filtered or unexported fields
}

func NewElastic

func NewElastic(conf *Config) *Elastic

default Host is http://127.0.0.1:9200

Source Files