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

Initial p2p channel implementation #1862

Merged
merged 1 commit into from
Mar 12, 2020
Merged

Initial p2p channel implementation #1862

merged 1 commit into from
Mar 12, 2020

Conversation

anjmao
Copy link
Contributor

@anjmao anjmao commented Mar 9, 2020

This PR adds initial p2p implementation in it's own standalone package. It uses H2C (HTTP2 over plain text) with kcp-go UDP transport and AES encryption. For now API accepts preshared private key and secure key exchange will be implemented in separate PR. It's possible (but not restricted) to send data in Protobuf format.

See channel_example_test.go for examples on proposed API.

p2p/channel.go Show resolved Hide resolved
p2p/channel.go Outdated Show resolved Hide resolved
p2p/channel_test.go Outdated Show resolved Hide resolved
p2p/channel_test.go Show resolved Hide resolved
p2p/channel_test.go Outdated Show resolved Hide resolved
p2p/context.go Show resolved Hide resolved
p2p/context.go Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #1862 into master will increase coverage by 0.34%.
The diff coverage is 78.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1862      +/-   ##
==========================================
+ Coverage   46.79%   47.13%   +0.34%     
==========================================
  Files         284      288       +4     
  Lines       11649    11780     +131     
==========================================
+ Hits         5451     5553     +102     
- Misses       5775     5795      +20     
- Partials      423      432       +9
Impacted Files Coverage Δ
p2p/key.go 100% <100%> (ø)
p2p/context.go 100% <100%> (ø)
p2p/message.go 62.5% <62.5%> (ø)
p2p/channel.go 76.63% <76.63%> (ø)
communication/nats/dialog/dialog_waiter.go 86.11% <0%> (-2.78%) ⬇️
core/discovery/discovery.go 65.54% <0%> (-0.85%) ⬇️
tequilapi/sse/sse.go 71.11% <0%> (ø) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 920536f...dddc83c. Read the comment docs.

@anjmao anjmao merged commit 7205584 into master Mar 12, 2020
@anjmao anjmao deleted the p2p-channel branch March 12, 2020 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants