elasticsearch

package
v0.0.0-...-a605f52 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkResponse

type BulkResponse struct {
	Took   int             `json:"took"`
	Errors bool            `json:"errors"`
	Items  json.RawMessage `json:"items"`
}

BulkResponse is the response that is returned by elastic search when doing a bulk request

type BulkResponseItem

type BulkResponseItem struct {
	Index  string      `json:"_index"`
	Type   string      `json:"_type"`
	ID     string      `json:"_id"`
	Status int         `json:"status"`
	Error  interface{} `json:"error"`
}

BulkResponseItem is response of one document from a bulk request

type Client

type Client interface {
	Request(httpMethod, path string, payload io.Reader) ([]byte, error)
	RequestWithCtx(ctx context.Context, httpMethod, path string, payload io.Reader) ([]byte, error)
	Bulk([]byte) error
	BulkFromFile(file string) error
}

Client defines an interface to interact with an elastic search instance

func NewClient

func NewClient(cfg config.ElasticSearch) (Client, error)

Directories

Path Synopsis
Package mock_elasticsearch is a generated GoMock package.
Package mock_elasticsearch is a generated GoMock package.

Jump to

Keyboard shortcuts

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