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

MetadataV2.proto update #14474

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,32 +63,32 @@ public static MetadataServiceV2 newStub(Invoker<?> invoker) {

private static final StubMethodDescriptor getMetadataInfoMethod = new StubMethodDescriptor(
"GetMetadataInfo",
Revision.class,
MetadataRequest.class,
MetadataInfoV2.class,
MethodDescriptor.RpcType.UNARY,
obj -> ((Message) obj).toByteArray(),
obj -> ((Message) obj).toByteArray(),
Revision::parseFrom,
MetadataRequest::parseFrom,
MetadataInfoV2::parseFrom);

private static final StubMethodDescriptor getMetadataInfoAsyncMethod = new StubMethodDescriptor(
"GetMetadataInfo",
Revision.class,
MetadataRequest.class,
CompletableFuture.class,
MethodDescriptor.RpcType.UNARY,
obj -> ((Message) obj).toByteArray(),
obj -> ((Message) obj).toByteArray(),
Revision::parseFrom,
MetadataRequest::parseFrom,
MetadataInfoV2::parseFrom);

private static final StubMethodDescriptor getMetadataInfoProxyAsyncMethod = new StubMethodDescriptor(
"GetMetadataInfoAsync",
Revision.class,
MetadataRequest.class,
MetadataInfoV2.class,
MethodDescriptor.RpcType.UNARY,
obj -> ((Message) obj).toByteArray(),
obj -> ((Message) obj).toByteArray(),
Revision::parseFrom,
MetadataRequest::parseFrom,
MetadataInfoV2::parseFrom);

static {
Expand All @@ -104,15 +104,15 @@ public MetadataServiceV2Stub(Invoker<MetadataServiceV2> invoker) {
}

@Override
public MetadataInfoV2 getMetadataInfo(Revision request) {
public MetadataInfoV2 getMetadataInfo(MetadataRequest request) {
return StubInvocationUtil.unaryCall(invoker, getMetadataInfoMethod, request);
}

public CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(Revision request) {
public CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(MetadataRequest request) {
return StubInvocationUtil.unaryCall(invoker, getMetadataInfoAsyncMethod, request);
}

public void getMetadataInfo(Revision request, StreamObserver<MetadataInfoV2> responseObserver) {
public void getMetadataInfo(MetadataRequest request, StreamObserver<MetadataInfoV2> responseObserver) {
StubInvocationUtil.unaryCall(invoker, getMetadataInfoMethod, request, responseObserver);
}
}
Expand All @@ -136,15 +136,15 @@ public void accept(T t, StreamObserver<R> observer) {
}

@Override
public CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(Revision request) {
public CompletableFuture<MetadataInfoV2> getMetadataInfoAsync(MetadataRequest request) {
return CompletableFuture.completedFuture(getMetadataInfo(request));
}

/**
* This server stream type unary method is <b>only</b> used for generated stub to support async unary method.
* It will not be called if you are NOT using Dubbo3 generated triple stub and <b>DO NOT</b> implement this method.
*/
public void getMetadataInfo(Revision request, StreamObserver<MetadataInfoV2> responseObserver) {
public void getMetadataInfo(MetadataRequest request, StreamObserver<MetadataInfoV2> responseObserver) {
getMetadataInfoAsync(request).whenComplete((r, t) -> {
if (t != null) {
responseObserver.onError(t);
Expand All @@ -168,9 +168,9 @@ public final Invoker<MetadataServiceV2> getInvoker(URL url) {
pathResolver.addNativeStub("/" + JAVA_SERVICE_NAME + "/GetMetadataInfo");
pathResolver.addNativeStub("/" + JAVA_SERVICE_NAME + "/GetMetadataInfoAsync");

BiConsumer<Revision, StreamObserver<MetadataInfoV2>> getMetadataInfoFunc = this::getMetadataInfo;
BiConsumer<MetadataRequest, StreamObserver<MetadataInfoV2>> getMetadataInfoFunc = this::getMetadataInfo;
handlers.put(getMetadataInfoMethod.getMethodName(), new UnaryStubMethodHandler<>(getMetadataInfoFunc));
BiConsumer<Revision, StreamObserver<MetadataInfoV2>> getMetadataInfoAsyncFunc =
BiConsumer<MetadataRequest, StreamObserver<MetadataInfoV2>> getMetadataInfoAsyncFunc =
syncToAsync(this::getMetadataInfo);
handlers.put(
getMetadataInfoProxyAsyncMethod.getMethodName(),
Expand All @@ -180,7 +180,7 @@ public final Invoker<MetadataServiceV2> getInvoker(URL url) {
}

@Override
public MetadataInfoV2 getMetadataInfo(Revision request) {
public MetadataInfoV2 getMetadataInfo(MetadataRequest request) {
throw unimplementedMethodException(getMetadataInfoMethod);
}

Expand Down
Loading
Loading