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

Internal change #2683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions src/devtools/deviceinfra/api/deviceinfo/proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package(
default_applicable_licenses = ["//:license"],
default_visibility = [
"//:deviceinfra_all_pkg",
"//java/com/google/cloud/test/common/wrangler:__subpackages__",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ java_library(
name = "device_allocation",
srcs = ["DeviceAllocationStub.java"],
deps = [
"//java/com/google/devtools/deviceinfra/service/scheduler/common",
"//src/devtools/mobileharness/infra/master/rpc/proto:device_allocation_service_java_proto",
"//src/java/com/google/devtools/common/metrics/stability/rpc:exception",
"@maven//:com_google_errorprone_error_prone_annotations",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
package com.google.devtools.mobileharness.infra.master.rpc.stub;

import com.google.devtools.common.metrics.stability.rpc.RpcExceptionWithErrorId;
import com.google.devtools.deviceinfra.service.scheduler.common.DeviceAllocationCallback;
import com.google.devtools.mobileharness.infra.master.rpc.proto.DeviceAllocationServiceProto.AllocationRequest;
import com.google.devtools.mobileharness.infra.master.rpc.proto.DeviceAllocationServiceProto.AllocationResponse;
import com.google.devtools.mobileharness.infra.master.rpc.proto.DeviceAllocationServiceProto.DeallocationRequest;
import com.google.devtools.mobileharness.infra.master.rpc.proto.DeviceAllocationServiceProto.DeallocationResponse;
import com.google.devtools.mobileharness.infra.master.rpc.proto.DeviceAllocationServiceProto.GetAvailableDevicesResponse;
import com.google.errorprone.annotations.CanIgnoreReturnValue;

/** RPC stub for talking to Master DeviceAllocationService. */
public interface DeviceAllocationStub extends AutoCloseable {
/** Allocates devices. */
AllocationResponse allocate(AllocationRequest request) throws RpcExceptionWithErrorId;
/** Allocates devices asynchronously and handles the response in the callback. */
void allocate(AllocationRequest request, DeviceAllocationCallback deviceAllocationCallback);

/** Deallocates devices. */
@CanIgnoreReturnValue
Expand Down