wait_for_ready

command
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

Wait for ready example

This example shows how to enable "wait for ready" in RPC calls.

This code starts a server with a 2 seconds delay. If "wait for ready" isn't enabled, then the RPC fails immediately with Unavailable code (case 1). If "wait for ready" is enabled, then the RPC waits for the server. If context dies before the server is available, then it fails with DeadlineExceeded (case 3). Otherwise it succeeds (case 2).

Run the example

go run main.go

Documentation

Overview

Binary wait_for_ready is an example for "wait for ready".

Jump to

Keyboard shortcuts

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