Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadBalancer handling overly complex #109

Open
cztk opened this issue Oct 4, 2023 · 0 comments
Open

LoadBalancer handling overly complex #109

cztk opened this issue Oct 4, 2023 · 0 comments

Comments

@cztk
Copy link

cztk commented Oct 4, 2023

This can't be meant how it's to be used is it?

$lb = $hetznerClient->loadBalancers()->getByName('...');
foreach($lb->targets as $target) {
    $ip = new LoadBalancerTargetIp($target->ip->ip);
    $lb->removeTarget('ip', $ip);
}

Same for addTarget

How I expected it to work;

$lb = $hetznerClient->loadBalancers()->getByName('...');
foreach($lb->targets as $target) {
    $lb->removeTarget($target);
   # or maybe, or make it smart and work with $target only aswell
    $lb->removeTargetByIp($target->ip);
}

Also missing a removeTargets($targets);

@cztk cztk changed the title LoadBalancer handling overly complex and inconsitent LoadBalancer handling overly complex Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant