elasticsearch

package
v0.0.0-...-f21c51b Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DieWhenConnectionFails

func DieWhenConnectionFails(ctx context.Context, es *elasticsearch.TypedClient)

DieWhenConnectionFails checks periodically that Elasticsearch can be reached. If this fails after a few retries, it panics.

TODO: Patch bb-storage to allow for dynamic health status.

func NewClientFromConfiguration

func NewClientFromConfiguration(configuration *pb.ClientConfiguration) (*elasticsearch.TypedClient, error)

NewClientFromConfiguration creates an elasticsearch.TypedClient object based on the provided configuration.

Types

type Uploader

type Uploader interface {
	Put(ctx context.Context, id string, document interface{}) error
}

The Uploader can be used to push documents into Elasticsearch.

func NewUploader

func NewUploader(
	elasticsearchClient *elasticsearch.TypedClient,
	index string,
	clock clock.Clock,
	warningLogger util.ErrorLogger,
) Uploader

NewUploader creates a new Uploader that uploads generic documents to Elasticsearch.

Jump to

Keyboard shortcuts

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