grpcready

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conn

func Conn(
	ctx context.Context,
	log hclog.Logger,
	conn *grpc.ClientConn,
	wait bool,
) error

Conn returns nil if the connection is in the ready state. If wait is set, this will wait for the connection to become ready or until the context is cancelled.

This is useful over `WithBlock` when connecting because it allows a fail-fast first attempt to connect. This makes it easily to synchronously attempt connection once before falling back to a retry loop in the background.

Types

This section is empty.

Jump to

Keyboard shortcuts

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