armeria icon indicating copy to clipboard operation
armeria copied to clipboard

Add CoroutineHttpService for handle request within Coroutine suspend

Open pinest94 opened this issue 10 months ago โ€ข 4 comments

Motivation:

  • Closes https://github.com/line/armeria/issues/5442

Modifications:

  • Add CoroutineHttpService implements HttpService

Result:

  • Closes #5442.
  • Provide HttpService based on coroutine suspend through CoroutineHttpService(without the boiler plate code that apply the coroutine)

pinest94 avatar Apr 12 '24 08:04 pinest94

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 12 '24 08:04 CLAassistant

๐Ÿ” Build Scanยฎ (commit: e6682de62d49e69eb752db0b930a73bc6cd45c14)

Job name Status Build Scanยฎ
build-windows-latest-jdk-19 โœ… https://ge.armeria.dev/s/zojch5uec6dhw
build-self-hosted-unsafe-jdk-8 โœ… https://ge.armeria.dev/s/nqhmsrv4neqhk
build-self-hosted-unsafe-jdk-19-snapshot-blockhound โœ… https://ge.armeria.dev/s/pus6jhtx3raxq
build-self-hosted-unsafe-jdk-17-min-java-17-coverage โœ… https://ge.armeria.dev/s/45svkkdbccr4i
build-self-hosted-unsafe-jdk-17-min-java-11 โœ… https://ge.armeria.dev/s/udl5gituxyfgy
build-self-hosted-unsafe-jdk-17-leak โœ… https://ge.armeria.dev/s/gkmlfqmha6pgo
build-self-hosted-unsafe-jdk-11 โœ… https://ge.armeria.dev/s/nlqy5u7u44pj2
build-macos-12-jdk-19 โœ… https://ge.armeria.dev/s/umtvthnggpamc

github-actions[bot] avatar Apr 12 '24 09:04 github-actions[bot]

Looks great! How about also adding extension methods in this PR as well? ๐Ÿ˜†

Does the extension method here refer to the extension function of the ServerBuilder?

pinest94 avatar Apr 24 '24 04:04 pinest94

Right. Should we add coroutineService for ServerBuilder, VirtualHostBuilder, and ContextPathServicesBuilder?

Server
  .builder()
  .coroutineService("/prefix", myCoroutineService)
  ...

ikhoon avatar May 02 '24 11:05 ikhoon

Let's add the extension methods in the next PR. ๐Ÿ˜‰ https://github.com/line/armeria/issues/5671

minwoox avatar May 09 '24 07:05 minwoox

Great job, @pinest94! ๐Ÿ‘

minwoox avatar May 10 '24 06:05 minwoox