Documentation
¶
Overview ¶
Code generated by hack/gen-logs.sh; DO NOT EDIT. This file is created and regenerated automatically. Anything added here might get removed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureReady ¶
func EnsureReady(ctx context.Context, provider HostProvider, checker ReadyChecker) bool
EnsureReady iterates through the configured hosts and returns true as soon as one responds as ready. It starts from the provider's current host and wraps around using modular arithmetic, performing failover when a host is not ready.
Types ¶
type HostProvider ¶
HostProvider is the subset of connection-provider methods that EnsureReady needs. Both grpc.GrpcConnectionProvider and rest.RestConnectionProvider satisfy this interface.
type ReadyChecker ¶
ReadyChecker can report whether the current endpoint is ready. iface.NodeClient satisfies this implicitly.