elasticsearch

package
v0.0.0-...-55e386a Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bulk

type Bulk interface {
	Add(index, tzpe string, msg interface{})
	CommitRequired(actions int, bulkSize int) bool
	Do(ctx context.Context) (interface{}, int, bool, error)
	Errors(bulkResponse interface{}) []map[int]string
	EstimatedSizeInBytes() int64
	NumberOfActions() int
}

Bulk Service implementation

func NewBulk

func NewBulk(client Client, timeout time.Duration, actions int) (Bulk, error)

NewBulk returns a bulkService depending on the client version

type Client

type Client interface {
	Add(index, tzpe string, msg interface{}) error

	// NewBulkProcessorService(ctx context.Context, workers, bulkActions, bulkSize int, flushInterval time.Duration, stats bool) error
	// Stop the bulk processor and do some cleanup
	Close() error
	Flush() error

	NewBulkProcessorService(ctx context.Context, workers, actions, size int, flushInterval, timeout time.Duration, stats bool, log *logrus.Entry) error

	// Stop stops the background processes that the client is running,
	// i.e. sniffing the cluster periodically and running health checks
	// on the nodes.
	Stop()

	Version() int
}

Client ...

func NewClient

func NewClient(version string, url, username, password string, timeout time.Duration, sniff bool, insecure bool) (Client, error)

NewClient ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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