elastic

package
v0.0.0-...-ea14be2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EsModule = fx.Provide(func(cfg *conf.Config, log *log.Logger) *elasticsearch.Client {
	config := elasticsearch.Config{}

	config.Addresses = []string{cfg.EsConfig.Host + ":" + cfg.EsConfig.Port}
	config.Username = cfg.EsConfig.Username
	config.Password = cfg.EsConfig.Password
	esClient, err := elasticsearch.NewClient(config)
	if err != nil {
		log.ZapLogger.Error("[elastic-conn-error]", zap.Any("error", err.Error()))
		panic(err)
	}
	return esClient
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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