-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [run] Adds Startup and Liveness probes to Cloud Run v2 API clie…
…nt libraries (#8612) * feat: Adds Startup and Liveness probes to Cloud Run v2 API client libraries For more information about this feature, visit https://cloud.google.com/run/docs/configuring/healthchecks PiperOrigin-RevId: 481203788 Source-Link: googleapis/googleapis@778762c Source-Link: https://github.com/googleapis/googleapis-gen/commit/1479c7a63fc7d5b5d98c48e9ba1d0b6a94e95513 Copy-Tag: eyJwIjoiamF2YS1ydW4vLk93bEJvdC55YW1sIiwiaCI6IjE0NzljN2E2M2ZjN2Q1YjVkOThjNDhlOWJhMWQwYjZhOTRlOTU1MTMifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update pom.xml Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Blake Li <blakeli@google.com>
- Loading branch information
1 parent
d0adf67
commit 5abd13a
Showing
34 changed files
with
5,760 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockLocations.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.run.v2; | ||
|
||
import com.google.api.core.BetaApi; | ||
import com.google.api.gax.grpc.testing.MockGrpcService; | ||
import com.google.protobuf.AbstractMessage; | ||
import io.grpc.ServerServiceDefinition; | ||
import java.util.List; | ||
import javax.annotation.Generated; | ||
|
||
@BetaApi | ||
@Generated("by gapic-generator-java") | ||
public class MockLocations implements MockGrpcService { | ||
private final MockLocationsImpl serviceImpl; | ||
|
||
public MockLocations() { | ||
serviceImpl = new MockLocationsImpl(); | ||
} | ||
|
||
@Override | ||
public List<AbstractMessage> getRequests() { | ||
return serviceImpl.getRequests(); | ||
} | ||
|
||
@Override | ||
public void addResponse(AbstractMessage response) { | ||
serviceImpl.addResponse(response); | ||
} | ||
|
||
@Override | ||
public void addException(Exception exception) { | ||
serviceImpl.addException(exception); | ||
} | ||
|
||
@Override | ||
public ServerServiceDefinition getServiceDefinition() { | ||
return serviceImpl.bindService(); | ||
} | ||
|
||
@Override | ||
public void reset() { | ||
serviceImpl.reset(); | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
java-run/google-cloud-run/src/test/java/com/google/cloud/run/v2/MockLocationsImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
* Copyright 2022 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.google.cloud.run.v2; | ||
|
||
import com.google.api.core.BetaApi; | ||
import com.google.cloud.location.LocationsGrpc.LocationsImplBase; | ||
import com.google.protobuf.AbstractMessage; | ||
import java.util.ArrayList; | ||
import java.util.LinkedList; | ||
import java.util.List; | ||
import java.util.Queue; | ||
import javax.annotation.Generated; | ||
|
||
@BetaApi | ||
@Generated("by gapic-generator-java") | ||
public class MockLocationsImpl extends LocationsImplBase { | ||
private List<AbstractMessage> requests; | ||
private Queue<Object> responses; | ||
|
||
public MockLocationsImpl() { | ||
requests = new ArrayList<>(); | ||
responses = new LinkedList<>(); | ||
} | ||
|
||
public List<AbstractMessage> getRequests() { | ||
return requests; | ||
} | ||
|
||
public void addResponse(AbstractMessage response) { | ||
responses.add(response); | ||
} | ||
|
||
public void setResponses(List<AbstractMessage> responses) { | ||
this.responses = new LinkedList<Object>(responses); | ||
} | ||
|
||
public void addException(Exception exception) { | ||
responses.add(exception); | ||
} | ||
|
||
public void reset() { | ||
requests = new ArrayList<>(); | ||
responses = new LinkedList<>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.