elasticsearch_go

package module
v0.0.0-...-68e8b69 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 5 Imported by: 0

README

elasticsearch-go

A toolkit dedicated to making ElasticSearch easier, more efficient and secure to use with Go.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZapLogger *zap1.Logger

Functions

This section is empty.

Types

type Client

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

Client is a client used to send RESTful request to ElasticSearch

func DefaultClient

func DefaultClient() *Client

DefaultClient creates a default ElasticSearch client which is conncted with the local ElasticSearch default

func NewClient

func NewClient(config Config) *Client

NewClient creates a new ElasticSearch client according to Config

func (*Client) Ping

func (c *Client) Ping() bool

Ping pings es server

type Config

type Config struct {

	// the addresses of the ElasticSearch cluster
	Addresses []string

	// the basic auth username
	Username string

	// the basic auth password
	Password string
}

Config defines the ElasticSearch config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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