Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement cargo collection #16

Merged
merged 32 commits into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1549781
Install dependencies
gnarea Feb 8, 2020
35b519a
Use Node 12 in functional tests
gnarea Feb 8, 2020
4be38c1
Transpile TS in Docker container instead of host
gnarea Feb 9, 2020
f523da0
Fix syntax error in Circle CI config
gnarea Feb 9, 2020
04e20c6
Fix typo
gnarea Feb 9, 2020
5642aa3
Fix permissions after transpiling TS in functional tests
gnarea Feb 9, 2020
20b8fd9
Fix args passed to `chown`
gnarea Feb 9, 2020
f083563
Implement stub for server
gnarea Feb 9, 2020
ca40fb9
Implement server
gnarea Feb 13, 2020
bfa878d
Remove stub client used for testing
gnarea Feb 13, 2020
8637ac4
Refactor
gnarea Feb 13, 2020
85b6429
Rename NATS subject for parcels received via PDC
gnarea Feb 14, 2020
c49d5d5
Implement deliverCargo() method
gnarea Feb 14, 2020
4582f81
Rename "relayer", "user gateway" and "relaying gateway"
gnarea Feb 15, 2020
7630ed4
Fix conding convention violation
gnarea Feb 17, 2020
3edf605
Complete service implementation integration
gnarea Feb 17, 2020
e39b655
Upgrade NATS streaming server
gnarea Feb 18, 2020
859a25d
Implement function to publish messages with NATS streaming
gnarea Feb 19, 2020
160f4b7
Support streaming arrays
gnarea Feb 19, 2020
b01ab02
Prevent NATS publisher from being reused
gnarea Feb 19, 2020
68c8ee2
Move NATS publisher to new class
gnarea Feb 19, 2020
b7d3b5b
Make NATS Streaming connection async to simplify code
gnarea Feb 19, 2020
3876bef
Introduce method to send single NATS message
gnarea Feb 19, 2020
dc44f3a
Refactor tests ahead of implementation
gnarea Feb 19, 2020
deaecbd
Migrate PoHTTP interface to NATS Streaming
gnarea Feb 19, 2020
9486c09
Upgrade Jest and related deps
gnarea Feb 20, 2020
4fc7fa5
Convert stream-based implementation to iterable-based
gnarea Feb 20, 2020
a98db47
Fix processing of invalid cargoes
gnarea Feb 20, 2020
afceb52
Make NATS streaming publisher yield ids of published msgs
gnarea Feb 20, 2020
962456f
Integrate NATS Streaming in deliverCargo method
gnarea Feb 20, 2020
2e28714
Remove plain NATS integration
gnarea Feb 20, 2020
470a42e
Integrate NATS Streaming in gRPC service factory
gnarea Feb 20, 2020
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
9 changes: 6 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ jobs:
sudo mv ~/docker-compose /usr/local/bin/docker-compose

# Install dependencies just so we can transpile the TS files to JS; then remove the deps.
- run: npm install
- run: npm run build
- run: rm -rf node_modules
- run:
name: Transpile project to JavaScript
command: |
docker run --rm -v "$(pwd):/tmp/gw" -w "/tmp/gw" node:12.15 bash -c "npm install && npm run build"
sudo chown --recursive "${USER}" build
sudo rm -rf node_modules

- run: ./src/functional_tests/run.sh

Expand Down
16 changes: 14 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '3.7'
services:
app:
pohttp:
build:
dockerfile: Dockerfile.dev
context: .
Expand All @@ -17,11 +17,23 @@ services:
- mongodb
- nats

cogrpc:
build:
dockerfile: Dockerfile.dev
context: .
image: relaynet-gw:local-dev
init: true
command: src/bin/cogrpc-server.ts
ports:
- '127.0.0.1:8081:8080'
volumes:
- ./src:/opt/gw-dev/src:ro

mongodb:
image: mongo:4.0

nats:
image: nats-streaming:0.16.2
image: nats-streaming:0.17.0
command: ['-DV']
ports:
- "127.0.0.1:4222:4222"
Loading