Skip to content

Commit

Permalink
chore: migrate Elasticsearch sink to new pipeline (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan authored Jun 27, 2023
1 parent 73965a2 commit 2fb43c4
Show file tree
Hide file tree
Showing 8 changed files with 221 additions and 237 deletions.
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ file-rotate = "0.7.4"
tokio = { version = "1", features = ["rt"] }
async-trait = "0.1.68"

# feature: elasticsink
elasticsearch = { version = "8.5.0-alpha.1", optional = true }

# feature: fingerprint
murmur3 = { version = "0.5.2", optional = true }

Expand Down Expand Up @@ -86,6 +83,9 @@ google-cloud-default = { version = "0.4.0", optional = true, features = ["pubsub
# features: sink-redis
r2d2_redis = { version = "0.14.0", optional = true }

# features: sink-elasticsearch
elasticsearch = { version = "8.5.0-alpha.1", optional = true }

# features: deno
deno_core = { version = "0.188.0", optional = true }
deno_runtime = { version = "0.114.0", optional = true }
Expand All @@ -100,3 +100,4 @@ sink-aws-sqs = ["aws-config", "aws-types", "aws-sdk-sqs"]
sink-aws-lambda = ["aws-config", "aws-types", "aws-sdk-lambda"]
sink-gcp-pubsub = ["google-cloud-pubsub", "google-cloud-googleapis", "google-cloud-default"]
sink-redis = ["r2d2_redis"]
sink-elasticsearch = ["elasticsearch"]
21 changes: 21 additions & 0 deletions examples/elasticsearch/daemon.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[source]
type = "N2N"
peers = ["relays-new.cardano-mainnet.iohk.io:3001"]

[chain]
type = "mainnet"

[intersect]
type = "Tip"

[[filters]]
type = "SplitBlock"

[[filters]]
type = "ParseCbor"

[sink]
type = "ElasticSearch"
url = "http://localhost:9200"
index = "oura.sink.v6"
idempotency = true
29 changes: 29 additions & 0 deletions examples/elasticsearch/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: "3"
services:
elasticsearch:
image: elasticsearch:8.8.1
container_name: elasticsearch
ports:
- "9200:9200"
- "9300:9300"
networks:
- elasticsearch-network
environment:
- xpack.security.enabled=false
- discovery.type=single-node

kibana:
image: kibana:8.8.1
container_name: kibana
ports:
- "5601:5601"
networks:
- elasticsearch-network
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
- elasticsearch

networks:
elasticsearch-network:
driver: bridge
4 changes: 0 additions & 4 deletions src/sinks/_pending/elastic/mod.rs

This file was deleted.

157 changes: 0 additions & 157 deletions src/sinks/_pending/elastic/run.rs

This file was deleted.

71 changes: 0 additions & 71 deletions src/sinks/_pending/elastic/setup.rs

This file was deleted.

Loading

0 comments on commit 2fb43c4

Please sign in to comment.