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

Add KubernetesEndpointGroup #5001

Merged
merged 16 commits into from
Apr 9, 2024
1 change: 1 addition & 0 deletions kubernetes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dependencies {
api(libs.kubernetes.client.impl)
testImplementation(variantOf(libs.kubernetes.client.api) { classifier("tests") })
testImplementation(libs.kubernetes.server.mock)
testImplementation(libs.kubernetes.junit.jupiter)
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public CompletableFuture<HttpResponse<AsyncBody>> consumeBytesDirect(
return splitResponse.headers().thenApply(responseHeaders -> {
final AsyncBodySubscriber subscriber = new AsyncBodySubscriber(consumer);
splitResponse.body().subscribe(subscriber, ctx.eventLoop());
return new ArmeriaHttpResponse(responseHeaders, subscriber);
return new ArmeriaHttpResponse(request, responseHeaders, subscriber);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@
import io.fabric8.kubernetes.client.http.AsyncBody;
import io.fabric8.kubernetes.client.http.HttpRequest;
import io.fabric8.kubernetes.client.http.HttpResponse;
import io.fabric8.kubernetes.client.http.StandardHttpRequest;
import io.netty.util.AsciiString;

final class ArmeriaHttpResponse implements HttpResponse<AsyncBody> {

private final StandardHttpRequest request;
private final ResponseHeaders responseHeaders;
private final AsyncBody body;

@Nullable
private Map<String, List<String>> headers;

ArmeriaHttpResponse(ResponseHeaders responseHeaders, AsyncBody body) {
ArmeriaHttpResponse(StandardHttpRequest request, ResponseHeaders responseHeaders, AsyncBody body) {
this.request = request;
this.responseHeaders = responseHeaders;
this.body = body;
}
Expand All @@ -61,7 +64,7 @@ public AsyncBody body() {

@Override
public HttpRequest request() {
return null;
return request;
}

@Override
Expand Down
Loading
Loading