Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-side streaming support #126

Open
aimuz opened this issue May 29, 2023 · 1 comment
Open

Server-side streaming support #126

aimuz opened this issue May 29, 2023 · 1 comment

Comments

@aimuz
Copy link

aimuz commented May 29, 2023

grpc-gateway supports Server-side streaming.

Server-side streaming is also supported by fetch.

https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_streams

The current protoc-gen-typescript-http has problems with clients generated by Server-side streaming.

protoc-gen-typescript-http

export interface LoggingService {
  QueryLogs(request: QueryLogsRequest): Promise<QueryLogsResponse>;
}

service.proto

service LoggingService {
  rpc QueryLogs(QueryLogsRequest) returns (QueryLogsResponse) {
    option (google.api.http) = {
      get: "/v1beta1/{parent=projects/*}/logs:query"
    };
    option (google.api.method_signature) = "parent";
  }

  rpc TailLogs(TailLogsRequest) returns (stream TailLogsResponse) {
    option (google.api.http) = {
      get: "/v1beta1/{parent=projects/*}/logs:tail"
    };
    option (google.api.method_signature) = "parent";
  }
}
@ericwenn
Copy link
Member

This plugin does not yet support server-side streaming, as we have not had a use-case for it.
If you feel up for adding that support, please go ahead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants