xds/

directory
v0.0.0-...-dba26e1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0

README

gRPC xDS example

xDS is the protocol initially used by Envoy, that is evolving into a universal data plan API for service mesh.

The xDS example is a Hello World client/server capable of being configured with the XDS management protocol. Out-of-the-box it behaves the same as our other hello world example. The server replies with responses including its hostname.

xDS environment setup

This example doesn't include instructions to setup xDS environment. Please refer to documentation specific for your xDS management server. Examples will be added later.

The client also needs a bootstrap file. See gRFC A27 for the bootstrap format.

The client

The client application needs to import the xDS package to install the resolver and balancers:

_ "google.golang.org/grpc/xds" // To install the xds resolvers and balancers.

Then, use xds target scheme for the ClientConn.

$ export GRPC_XDS_BOOTSTRAP=/path/to/bootstrap.json
$ go run client/main.go "xDS world" xds:///target_service

Directories

Path Synopsis
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.
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.

Jump to

Keyboard shortcuts

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