if r.config.refreshOnRead() {
// This is useful for test and single-node deployments that need endpoint writes
endpoint_registry.go
// to be visible to GetByID immediately, without waiting for background long poll.
if err := r.loadEndpoints(ctx); err != nil {
return nil, fmt.Errorf("refreshing endpoints: %w", err)
}