use of org.apache.beam.vendor.grpc.v1p43p2.io.grpc.CallCredentials in project spring-cloud-gcp by spring-cloud.
the class FirestoreIntegrationTestsConfiguration method firestoreStub.
@Bean
FirestoreGrpc.FirestoreStub firestoreStub() throws IOException {
GoogleCredentials credentials = GoogleCredentials.getApplicationDefault();
CallCredentials callCredentials = MoreCallCredentials.from(credentials);
// Create a channel
ManagedChannel channel = ManagedChannelBuilder.forTarget("dns:///firestore.googleapis.com:443").build();
return FirestoreGrpc.newStub(channel).withCallCredentials(callCredentials);
}
Aggregations