os2

package
v1.2.9-prerelease6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NumberDecoder

type NumberDecoder struct{}

NumberDecoder uses json.NewDecoder, with UseNumber() enabled, from the Go standard library to decode JSON data.

func (*NumberDecoder) Decode

func (u *NumberDecoder) Decode(reader io.Reader, v interface{}) error

func (*NumberDecoder) UnmarshalFromReader

func (u *NumberDecoder) UnmarshalFromReader(reader io.Reader, response *opensearchutil.BulkIndexerResponse) error

type OS2

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

OS2 implements Client

func NewClient

func NewClient(
	connectConfig *config.ElasticSearchConfig,
	logger log.Logger,
	tlsClient *http.Client,
) (*OS2, error)

NewClient returns a new implementation of GenericClient

func (*OS2) ClearScroll

func (c *OS2) ClearScroll(ctx context.Context, scrollID string) error

func (*OS2) Count

func (c *OS2) Count(ctx context.Context, index, query string) (int64, error)

func (*OS2) CreateIndex

func (c *OS2) CreateIndex(ctx context.Context, index string) error

func (*OS2) IsNotFoundError

func (c *OS2) IsNotFoundError(err error) bool

func (*OS2) PutMapping

func (c *OS2) PutMapping(ctx context.Context, index, body string) error

func (*OS2) RunBulkProcessor

func (c *OS2) RunBulkProcessor(_ context.Context, parameters *bulk.BulkProcessorParameters) (bulk.GenericBulkProcessor, error)

func (*OS2) Scroll

func (c *OS2) Scroll(ctx context.Context, index, body, scrollID string) (*client.Response, error)

func (*OS2) Search

func (c *OS2) Search(ctx context.Context, index, body string) (*client.Response, error)

Jump to

Keyboard shortcuts

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