Skip to content

Commit 17d3f6f

Browse files
authored
Merge pull request #176 from benthecarman/from-scratch-grpc
Replace REST and RabbitMQ with gRPC
2 parents fe76c7e + 2a689fd commit 17d3f6f

78 files changed

Lines changed: 3048 additions & 4624 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check-protos.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Check Generated Protos
33
on:
44
push:
55
paths:
6-
- 'ldk-server-protos/**'
6+
- 'ldk-server-grpc/**'
77
pull_request:
88
paths:
9-
- 'ldk-server-protos/**'
9+
- 'ldk-server-grpc/**'
1010
workflow_dispatch:
1111

1212
permissions:
@@ -28,12 +28,12 @@ jobs:
2828
- name: Install protoc
2929
run: sudo apt-get install -y protobuf-compiler
3030
- name: Generate protos
31-
run: RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-protos
31+
run: RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-grpc
3232
- name: Format generated code
3333
run: rustup component add rustfmt && cargo fmt --all
3434
- name: Check for differences
3535
run: |
3636
if ! git diff --exit-code; then
37-
echo "error: Generated protobuf files are out of date. Run: RUSTFLAGS=\"--cfg genproto\" cargo build -p ldk-server-protos && cargo fmt --all"
37+
echo "error: Generated protobuf files are out of date. Run: RUSTFLAGS=\"--cfg genproto\" cargo build -p ldk-server-grpc && cargo fmt --all"
3838
exit 1
3939
fi

.github/workflows/integration-tests-events-rabbitmq.yml renamed to .github/workflows/e2e-tests.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Integration Tests
1+
name: End-to-End Tests
22

33
on: [ push, pull_request ]
44

@@ -10,23 +10,9 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
integration-tests:
13+
e2e-tests:
1414
runs-on: ubuntu-latest
1515

16-
services:
17-
rabbitmq:
18-
image: rabbitmq:3
19-
env:
20-
RABBITMQ_DEFAULT_USER: guest
21-
RABBITMQ_DEFAULT_PASS: guest
22-
ports:
23-
- 5672:5672
24-
options: >-
25-
--health-cmd "rabbitmqctl node_health_check"
26-
--health-interval 10s
27-
--health-timeout 5s
28-
--health-retries 5
29-
3016
steps:
3117
- name: Checkout code
3218
uses: actions/checkout@v6
@@ -48,11 +34,6 @@ jobs:
4834
- name: Set bitcoind environment variable
4935
run: echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
5036

51-
- name: Run RabbitMQ integration tests
52-
run: cargo test --features integration-tests-events-rabbitmq --verbose --color=always -- --nocapture
53-
env:
54-
RUST_BACKTRACE: 1
55-
5637
- name: Run end-to-end tests
5738
run: cargo test --manifest-path e2e-tests/Cargo.toml --verbose --color=always -- --test-threads=4 --nocapture
5839
env:

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for build commands, testing, code style,
99
- **ldk-server** - Main daemon server (entry point: `src/main.rs`)
1010
- **ldk-server-cli** - CLI client using clap
1111
- **ldk-server-client** - Reqwest-based client library
12-
- **ldk-server-protos** - Protocol buffer definitions and generated Rust code
12+
- **ldk-server-grpc** - Protocol buffer definitions, generated Rust code, and shared gRPC primitives
1313

1414
## Development Rules
1515

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ cargo clippy --all-features -- -D warnings -A clippy::drop_non_drop # Lint (CI
4040
## Protocol Buffer Generation
4141

4242
```bash
43-
RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-protos
43+
RUSTFLAGS="--cfg genproto" cargo build -p ldk-server-grpc
4444
cargo fmt --all
4545
```
4646

4747
## Adding a New API Endpoint
4848

49-
1. Define request/response messages in `ldk-server-protos/src/proto/api.proto`
49+
1. Define request/response messages in `ldk-server-grpc/src/proto/api.proto`
5050
2. Regenerate protos (see above)
5151
3. Create handler in `ldk-server/src/api/` (follow existing patterns)
5252
4. Add route in `ldk-server/src/service.rs`

0 commit comments

Comments
 (0)