Swiftpack.co - brokenhandsio/soto-elasticsearch-nio-client as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by brokenhandsio.
brokenhandsio/soto-elasticsearch-nio-client 0.1.1
An AWS wrapper around Elasticsearch NIO Client
⭐️ 1
🕓 2 years ago
.package(url: "https://github.com/brokenhandsio/soto-elasticsearch-nio-client.git", from: "0.1.1")

Soto Elasticsearch NIO Client

An AWS wrapper around ElasticsearchNIOClient. This library allows you to send Elasticsearch queries and requests to the AWS Elasticsearch Service. It uses Soto to sign the requests. This library works with other Elasticsearch endpoints, including local ones as well as AWS.

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:

    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.


Stars: 1
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

2 years ago

Adds new APIs from main library

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics