Skip to content

Server-side streaming support #126

@aimuz

Description

@aimuz

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";
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions