Skip to content

Commit

Permalink
Add TransportService
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharma-xyz committed Aug 1, 2024
1 parent 38466cd commit 800ca22
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ wire {
kotlin {
javaInterop = true
out = "$projectDir/build/generated/source/wire"
rpcCallStyle = "suspending"
rpcRole = "client"
singleMethodServices = false
}
protoPath {
srcDir("src/main/proto")
Expand Down
4 changes: 2 additions & 2 deletions lib/src/main/proto/xyz/ksharma/transport/gtfs_realtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
// https://github.com/google/transit/tree/master/gtfs-realtime

syntax = "proto2";
option java_package = "xyz.ksharma.transit.realtime";
package transit_realtime;
option java_package = "xyz.ksharma.transport";
package xyz.ksharma.transport;

// The contents of a feed message.
// A feed is a continuous stream of feed messages. Each message in the stream is
Expand Down
13 changes: 13 additions & 0 deletions lib/src/main/proto/xyz/ksharma/transport/transport_service.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
syntax = "proto2";

package xyz.ksharma.transport;
import "xyz/ksharma/transport/gtfs_realtime.proto";

option java_package = "xyz.ksharma.transport";
option java_outer_classname = "TransportService";

service TransportService {
rpc GetSchedule(Empty) returns (xyz.ksharma.transport.FeedMessage);
}

message Empty {}

0 comments on commit 800ca22

Please sign in to comment.