examples

module
v0.0.0-...-c2398ce Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0

README

Examples

The following examples are provided to help users get started with gRPC-Go. They are arranged as follows:

  • helloworld - a simple example showing a basic client and server
  • routeguide - a more complicated example showing different types of streaming RPCs
  • features - a collection of examples, each focused on a single gRPC feature

data is a directory containing data used by the examples, e.g. TLS certificates.

Directories

Path Synopsis
Package data provides convenience routines to access files in the data directory.
Package data provides convenience routines to access files in the data directory.
features
authentication/client
The client demonstrates how to supply an OAuth2 token for every RPC.
The client demonstrates how to supply an OAuth2 token for every RPC.
authentication/server
The server demonstrates how to consume and validate OAuth2 tokens provided by clients for each RPC.
The server demonstrates how to consume and validate OAuth2 tokens provided by clients for each RPC.
authz/client
Binary client is an example client.
Binary client is an example client.
authz/server
Binary server is an example server.
Binary server is an example server.
authz/token
Package token implements an example of authorization token encoding/decoding that can be used in RPC headers.
Package token implements an example of authorization token encoding/decoding that can be used in RPC headers.
cancellation/client
Binary client is an example client.
Binary client is an example client.
cancellation/server
Binary server is an example server.
Binary server is an example server.
compression/client
Binary client is an example client.
Binary client is an example client.
compression/server
Binary server is an example server.
Binary server is an example server.
deadline/client
Binary client is an example client.
Binary client is an example client.
deadline/server
Binary server is an example server.
Binary server is an example server.
debugging/client
Binary client is an example client.
Binary client is an example client.
debugging/server
Binary server is an example server.
Binary server is an example server.
encryption/ALTS/client
Binary client is an example client.
Binary client is an example client.
encryption/ALTS/server
Binary server is an example server.
Binary server is an example server.
encryption/TLS/client
Binary client is an example client.
Binary client is an example client.
encryption/TLS/server
Binary server is an example server.
Binary server is an example server.
encryption/mTLS/client
Binary client is an example client which connects to the server using mTLS.
Binary client is an example client which connects to the server using mTLS.
encryption/mTLS/server
Binary server is an example server which authenticates clients using mTLS.
Binary server is an example server which authenticates clients using mTLS.
error_details/client
Binary client is an example client.
Binary client is an example client.
error_details/server
Binary server is an example server.
Binary server is an example server.
error_handling/client
Binary client is an example client.
Binary client is an example client.
error_handling/server
Binary server is an example server.
Binary server is an example server.
flow_control/client
Binary client is an example client.
Binary client is an example client.
flow_control/server
Binary server is an example server.
Binary server is an example server.
health/client
Binary client is an example client.
Binary client is an example client.
health/server
Binary server is an example server.
Binary server is an example server.
interceptor/client
Binary client is an example client.
Binary client is an example client.
interceptor/server
Binary server is an example server.
Binary server is an example server.
keepalive/client
Binary client is an example client.
Binary client is an example client.
keepalive/server
Binary server is an example server.
Binary server is an example server.
load_balancing/client
Binary client is an example client.
Binary client is an example client.
load_balancing/server
Binary server is an example server.
Binary server is an example server.
metadata/client
Binary client is an example client.
Binary client is an example client.
metadata/server
Binary server is an example server.
Binary server is an example server.
metadata_interceptor/client
Binary client is an example client.
Binary client is an example client.
metadata_interceptor/server
Binary server is an example server.
Binary server is an example server.
multiplex/client
Binary client is an example client.
Binary client is an example client.
multiplex/server
Binary server is an example server.
Binary server is an example server.
name_resolving/client
Binary client is an example client.
Binary client is an example client.
name_resolving/server
Binary server is an example server.
Binary server is an example server.
orca/client
Binary client is an example client.
Binary client is an example client.
orca/server
Binary server is an example server.
Binary server is an example server.
reflection/server
Binary server is an example server.
Binary server is an example server.
retry/client
Binary client is an example client.
Binary client is an example client.
retry/server
Binary server is an example server.
Binary server is an example server.
stats_monitoring/client
Binary client is an example client to illustrate the use of the stats handler.
Binary client is an example client to illustrate the use of the stats handler.
stats_monitoring/server
Binary server is an example server to illustrate the use of the stats handler.
Binary server is an example server to illustrate the use of the stats handler.
stats_monitoring/statshandler
Package statshandler is an example pkg to illustrate the use of the stats handler.
Package statshandler is an example pkg to illustrate the use of the stats handler.
unix_abstract/client
Binary client is an example client which dials a server on an abstract unix socket.
Binary client is an example client which dials a server on an abstract unix socket.
unix_abstract/server
Binary server is an example server listening for gRPC connections on an abstract unix socket.
Binary server is an example server listening for gRPC connections on an abstract unix socket.
wait_for_ready
Binary wait_for_ready is an example for "wait for ready".
Binary wait_for_ready is an example for "wait for ready".
xds/client
Binary main implements a client for Greeter service using gRPC's client-side support for xDS APIs.
Binary main implements a client for Greeter service using gRPC's client-side support for xDS APIs.
xds/server
Binary server demonstrated gRPC's support for xDS APIs on the server-side.
Binary server demonstrated gRPC's support for xDS APIs on the server-side.
greeter_client
Package main implements a client for Greeter service.
Package main implements a client for Greeter service.
greeter_server
Package main implements a server for Greeter service.
Package main implements a server for Greeter service.
route_guide
client
Package main implements a simple gRPC client that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
Package main implements a simple gRPC client that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
server
Package main implements a simple gRPC server that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.
Package main implements a simple gRPC server that demonstrates how to use gRPC-Go libraries to perform unary, client streaming, server streaming and full duplex RPCs.

Jump to

Keyboard shortcuts

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