grpcecho

command
v0.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command grpcecho is a gRPC server and client for the end-to-end tests of gRPC streams (#315, #317). The service, inkwall.test.Echo, has no .proto: its messages are google.protobuf.StringValue (field 1, text).

  • Collect, a client stream: the server reads every message, and answers how many it got.
  • Chat, a bidirectional call: the server echoes each message as it comes; the client waits for each echo before it sends the next, so a proxy that holds the call until the client ends its side stalls it.
  • Stream, a server stream: the server sends the request's text split at "|", one message each; a part "status:TEXT" ends the call there with status INTERNAL and TEXT as its message (before any message: a trailers-only answer).

The server logs each message it gets ("got: TEXT"), so a test can tell a message never reached it.

grpcecho serve -listen :50051
grpcecho collect -authority grpc.example.com 127.0.0.1:8080 hello world "1' OR '1'='1' -- "
grpcecho chat -authority grpc.example.com 127.0.0.1:8080 hello world
grpcecho stream -authority grpc.example.com 127.0.0.1:8080 'hello|world'

A client prints the messages it got back, one per line, then the call's status code (OK, PermissionDenied, ...).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL