https://github.com/marcoferrer/kotlin-coroutines-grpc-template
gRPC Kotlin template project for getting started building clients and services using Kotlin Coroutines and kroto-plus code generation.
https://github.com/marcoferrer/kotlin-coroutines-grpc-template
coroutines grpc grpc-java grpc-kotlin kotlin kotlin-coroutines protobuf
Last synced: 3 months ago
JSON representation
gRPC Kotlin template project for getting started building clients and services using Kotlin Coroutines and kroto-plus code generation.
- Host: GitHub
- URL: https://github.com/marcoferrer/kotlin-coroutines-grpc-template
- Owner: marcoferrer
- Created: 2018-12-19T01:33:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-01T15:46:01.000Z (over 6 years ago)
- Last Synced: 2025-04-01T17:09:22.239Z (9 months ago)
- Topics: coroutines, grpc, grpc-java, grpc-kotlin, kotlin, kotlin-coroutines, protobuf
- Language: Kotlin
- Homepage:
- Size: 71.3 KB
- Stars: 12
- Watchers: 0
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/marcoferrer/kroto-plus)
## Kotlin Coroutines gRPC Template
This is a template project for getting started building __[gRPC](https://github.com/grpc/grpc-java)__ clients and services using __[Kotlin Coroutines](https://github.com/Kotlin/kotlinx.coroutines)__ and __[kroto-plus](https://github.com/marcoferrer/kroto-plus)__ code generation.
* Template Variations
* [Using protoc-gen-grpc-coroutines](https://github.com/marcoferrer/kotlin-coroutines-gRPC-template) (Basic)
* [Using protoc-gen-kroto-plus](https://github.com/marcoferrer/kotlin-coroutines-gRPC-template/tree/kroto-plus-template ) (Advanced Features)
* [Using protobuf-lite](https://github.com/marcoferrer/kotlin-coroutines-gRPC-template/tree/protobuf-lite)
The template can be built and ran using the following command:
```bash
git clone https://github.com/marcoferrer/kotlin-coroutines-gRPC-template && \
cd kotlin-coroutines-gRPC-template && \
./gradlew run
```
This template covers:
* Recommeded Build Configuration
* Implementing A Service
* Instantiating A Client Stub
* Attaching a ```coroutineContext```
* Client and Server Rpc Method Examples:
* Unary
* Client Streaming
* Server Streaming
* BiDirectional Streaming