elasticsearch

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingNodes = errors.New("elasticsearch: missing node(s) url(s)")

Functions

This section is empty.

Types

type Options

type Options struct {
	// Nodes contains urls of the instances.
	Nodes []string

	Username string
	Password string

	// PingDeadline represents the limit
	// to receive a ping response.
	PingDeadline time.Duration
}

Options contains the basic elements to establish a connection with an Elasticsearch cluster.

type TypedPool

type TypedPool struct {
	*elasticsearch.TypedClient
}

TypedPool wraps the TypedClient

func New

func New(opt *Options) (*TypedPool, error)

Creates a new elasticsearch typed client with the basic authentication method using username and password. Returns ErrMissingNodes if len(opt.Nodes) == 0.

Jump to

Keyboard shortcuts

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