use of build.buildfarm.v1test.Tree in project bazel-buildfarm by bazelbuild.
the class ContentAddressableStorageService method getInstanceTree.
private void getInstanceTree(Instance instance, Digest rootDigest, String pageToken, int pageSize, StreamObserver<GetTreeResponse> responseObserver) {
do {
Tree.Builder builder = Tree.newBuilder().setRootDigest(rootDigest);
String nextPageToken = instance.getTree(rootDigest, pageSize, pageToken, builder);
Tree tree = builder.build();
GetTreeResponse.Builder response = GetTreeResponse.newBuilder().setNextPageToken(nextPageToken);
response.addAllDirectories(tree.getDirectoriesMap().values());
responseObserver.onNext(response.build());
pageToken = nextPageToken;
} while (!pageToken.isEmpty());
responseObserver.onCompleted();
}
Aggregations