fallback

package
v7.1.3-rc.4 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

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

type HostProvider interface {
	Hosts() []string
	CurrentHost() string
	SwitchHost(index int) error
}

HostProvider is the subset of connection-provider methods that EnsureReady needs. Both grpc.GrpcConnectionProvider and rest.RestConnectionProvider satisfy this interface.

type ReadyChecker

type ReadyChecker interface {
	IsReady(ctx context.Context) bool
}

ReadyChecker can report whether the current endpoint is ready. iface.NodeClient satisfies this implicitly.

Jump to

Keyboard shortcuts

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