Skip to content

sbt-airframe: Generate sever impl stub  #1026

@xerial

Description

@xerial

Using server-implementation specific details (e.g., Future, Request argument) is not ideal and handling these details is a bit tricky for code generators. We should generate server implementation base classes from RPC interfaces instead.

RPC interface:

@RPC
trait MyApi {
  def hello(user:User): Message
}

Generated stub:

trait MyApiStub {
  def hello(user:User, context:HttpRequestContext): Future[Message]
}

The context object may have HttpMessage.Request and a handler for http2 streaming.

Options:

  • Future type to use (none, twitter Future, Scala Future, or F[_])

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions