Make Lookup/{Response,Producer} compatible to /nodes endpoint
This commit is contained in:
@ -13,6 +13,8 @@ final class Producer
|
|||||||
public int $tcpPort,
|
public int $tcpPort,
|
||||||
public int $httpPort,
|
public int $httpPort,
|
||||||
public string $version,
|
public string $version,
|
||||||
|
public array $tombstones,
|
||||||
|
public array $topics,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,6 +27,8 @@ final class Producer
|
|||||||
$array['tcp_port'],
|
$array['tcp_port'],
|
||||||
$array['http_port'],
|
$array['http_port'],
|
||||||
$array['version'],
|
$array['version'],
|
||||||
|
$array['tombstones'] ?? [],
|
||||||
|
$array['topics'] ?? [],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ final class Response
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new self(
|
return new self(
|
||||||
$array['channels'],
|
$array['channels'] ?? [],
|
||||||
array_map([Producer::class, 'fromArray'], $array['producers']),
|
array_map([Producer::class, 'fromArray'], $array['producers']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user