-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a180f70
Showing
15 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
main: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
# Setup | ||
- uses: actions/checkout@v4 | ||
- uses: seamlik/devops/.github/actions/cache-rust | ||
- uses: seamlik/devops/.github/actions/cache-nodejs | ||
- run: npm install --global prettier | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- uses: seamlik/devops/.github/actions/install-devops | ||
- uses: arduino/setup-protoc@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Verify | ||
- run: cargo test | ||
- run: devops format rust yaml markdown protobuf | ||
- uses: seamlik/devops/.github/actions/check-formatting | ||
- uses: bufbuild/buf-lint-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target/ | ||
/Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[workspace] | ||
members = ["protocol/rust"] | ||
resolver = "2" | ||
|
||
[workspace.package] | ||
edition = "2021" | ||
publish = false | ||
version = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# License | ||
|
||
This is not free software. | ||
All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Tansa: LAN service discovery over multicast | ||
|
||
Work in progress. | ||
|
||
## Project name meaning | ||
|
||
Based on Japanese 探索 with pronounciation "tansaku" meaning "discovery". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
version: v1 | ||
directories: | ||
- protocol/grpc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: v1 | ||
lint: | ||
except: | ||
- RPC_REQUEST_STANDARD_NAME | ||
- RPC_RESPONSE_STANDARD_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
|
||
package tw.seamlik.tansa.v1; | ||
|
||
import "tw/seamlik/tansa/v1/socket_address.proto"; | ||
|
||
message Request { | ||
bytes request_id = 1; | ||
SocketAddress response_collector_address = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
syntax = "proto3"; | ||
|
||
package tw.seamlik.tansa.v1; | ||
|
||
import "tw/seamlik/tansa/v1/socket_address.proto"; | ||
|
||
message Response { | ||
bytes request_id = 1; | ||
bytes response_id = 2; | ||
SocketAddress endpoint_address = 3; | ||
} |
10 changes: 10 additions & 0 deletions
10
protocol/grpc/tw/seamlik/tansa/v1/response_collector_service.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
|
||
package tw.seamlik.tansa.v1; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "tw/seamlik/tansa/v1/response.proto"; | ||
|
||
service ResponseCollectorService { | ||
rpc SubmitResponse(Response) returns (google.protobuf.Empty) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
syntax = "proto3"; | ||
|
||
package tw.seamlik.tansa.v1; | ||
|
||
message SocketAddress { | ||
bytes ipv6 = 1; | ||
uint32 port = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[package] | ||
edition.workspace = true | ||
name = "tansa-protocol" | ||
publish.workspace = true | ||
version.workspace = true | ||
|
||
[dependencies] | ||
tonic = "0.11" | ||
prost = "0.12" | ||
prost-types = "0.12" | ||
|
||
[build-dependencies] | ||
tonic-build = "0.11" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn main() -> std::io::Result<()> { | ||
tonic_build::configure().compile( | ||
&["../grpc/tw/seamlik/tansa/v1/response_collector_service.proto"], | ||
&["../grpc"], | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//! Generated gRPC definitions. | ||
|
||
tonic::include_proto!("tw.seamlik.tansa.v1"); |