Skip to content

LoadBalancer handling overly complex #109

@cztk

Description

@cztk

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions