Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Modified by Straw Hat, LLC in 2026.
name: CI

on:
Expand Down
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,28 @@
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2026 Straw Hat, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
39 changes: 15 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Spear
# TrogonEventStore Elixir client

![CI](https://github.com/TrogonStack/TrogonEventStore-Client-Elixir/actions/workflows/ci.yml/badge.svg)
[![Integration](https://github.com/TrogonStack/TrogonEventStore-Client-Elixir/actions/workflows/integration.yml/badge.svg)](https://github.com/TrogonStack/TrogonEventStore-Client-Elixir/actions/workflows/integration.yml)
[![hex.pm version](https://img.shields.io/hexpm/v/spear.svg)](https://hex.pm/packages/spear)
[![hex.pm license](https://img.shields.io/hexpm/l/spear.svg)](https://github.com/TrogonStack/TrogonEventStore-Client-Elixir/blob/main/LICENSE)
[![Last Updated](https://img.shields.io/github/last-commit/TrogonStack/TrogonEventStore-Client-Elixir.svg)](https://github.com/TrogonStack/TrogonEventStore-Client-Elixir/commits/main)

A sharp EventStoreDB 20+ client backed by mint :yum:
An Elixir gRPC client for TrogonEventStore backed by Mint.

This repository is TrogonStack's downstream fork of
[`CuatroElixir/spear`](https://github.com/CuatroElixir/spear). It preserves the
Spear API and package identity while compatibility is established against
TrogonEventStore.
The client currently preserves the Spear API and package identity while
compatibility is established against TrogonEventStore.

This project contains modifications by Straw Hat, LLC to software received
under the Apache License 2.0. See [LICENSE](LICENSE) for the license terms.

## FAQ

Expand Down Expand Up @@ -40,10 +41,9 @@ to implement gRPC with a nice HTTP2 library like mint :slightly_smiling_face:.

**Why not [`elixir-grpc/grpc`](https://github.com/elixir-grpc/grpc)?**

That project looks good but it depends on
[`:gun`](https://github.com/ninenines/gun) which doesn't play nice with
other dependencies[^1]. It also provides a server and client implementation in
one library. This library only needs a client.
That project historically depended on
[`:gun`](https://github.com/ninenines/gun), while this client only needs a
Mint-backed client implementation.

> [!NOTE]
> This is not true anymore: `elixir-grpc/grpc` has supported a Mint adapter since v0.6.0
Expand All @@ -57,10 +57,9 @@ Yep! As of v0.1.3, custom and public CAs may be used for encrypted connections.

Sadly no. This library only provides a gRPC client which showed up in
EventStoreDB 20+. If you're looking for a similarly fashioned TCP client,
NFIBrokerage uses
[`exponentially/extreme`](https://github.com/exponentially/extreme) extensively
in production (specifically the v1.0.0 branch). Spear and Extreme have
compatible dependencies and similar styles of making connections.
provides an older transport option. Spear and Extreme have compatible
dependencies and similar styles of making connections.

**How many dependencies are we talking here?**

Expand All @@ -81,10 +80,8 @@ spear

**How close is this to being able to be used?**

We `@NFIBrokerage` already use Spear for some production connections to
Event Store Cloud. See the roadmap in
[#7](https://github.com/CuatroElixir/spear/issues/7) with the plans for
reaching the v1.0.0 release.
Compatibility with TrogonEventStore is still being established. The manual
integration workflow tracks that work independently from server-free CI.

## Installation

Expand Down Expand Up @@ -254,10 +251,4 @@ iex> Spear.stream!(conn, "LongStream") |> Enum.count
</details>

And that's the basics! Check out the [Spear documentation on
hex](https://hexdocs.pm/spear/Spear.html). Interested in writing
efficient event-processing pipelines and topologies with EventStoreDB
via [GenStage](https://github.com/elixir-lang/gen_stage) and
[Broadway](https://github.com/dashbitco/broadway) producers? Check out
[Volley](https://github.com/NFIBrokerage/volley).

[^1]: https://github.com/CuatroElixir/spear/issues/66
Hex](https://hexdocs.pm/spear/Spear.html).
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Modified by Straw Hat, LLC in 2026.
services:
eventstore:
image: ${TROGON_EVENTSTORE_IMAGE:-ghcr.io/trogonstack/trogoneventstore:ci}
Expand Down
2 changes: 2 additions & 0 deletions eventstoredb/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# TrogonEventStore test configuration

Modified by Straw Hat, LLC in 2026.

This directory contains TrogonEventStore configuration used for integration
testing.

Expand Down
1 change: 1 addition & 0 deletions eventstoredb/eventstore.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Modified by Straw Hat, LLC in 2026.
# Paths
Db: /var/lib/eventstore
Index: /var/lib/eventstore/index
Expand Down
1 change: 1 addition & 0 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Modified by Straw Hat, LLC in 2026.
defmodule Spear.MixProject do
use Mix.Project

Expand Down