Contents

brokenhandsio/soto-elasticsearch-nio-client

An AWS wrapper around Elasticsearch NIO Client

Installation and Usage

First add the library as a dependency in your dependencies array in Package.swift:

.package(url: "https://github.com/brokenhandsio/soto-elasticsearch-nio-client.git", from: "0.1.0"),

Then add the dependency to the target you require it in:

.target(
    name: "App",
    dependencies: [
        // ...
        .product(name: "SotoElasticsearchNIOClient", package: "soto-elasticsearch-nio-client")
    ],
)

Creating an instance of SotoElasticsearchNIOClient depends on your environment, but you should be able to work it out depending on what you need. For Vapor, for example, you'd do something like:

let elasticsearchClient = SotoElasticsearchClient(awsClient: req.application.aws.client, eventLoop: req.eventLoop, logger: req.logger, httpClient: req.application.http.client.shared, host: host)

Supported Features

The library supports all the functionality of ElasticsearchNIOClient. SotoElasticsearchClient exposes the underlying ElasticsearchClient you can pass requests to if needed, but most should be wrapped.

If you'd like to add extra functionality, either open an issue and raise a PR. Any contributions are gratefully accepted!

Elasticsearch Version

The library has been tested again Elasticsearch 7.6.2, but should work for the most part against older versions.

Package Metadata

Repository: brokenhandsio/soto-elasticsearch-nio-client

Stars: 2

Forks: 0

Open issues: 1

Default branch: main

Primary language: swift

License: MIT

README: README.md