Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
/python-runPublic archive

Commitd4d22ec

Browse files
feat: Adds Startup and Liveness probes to Cloud Run v2 API client libraries (#60)
* feat: Adds Startup and Liveness probes to Cloud Run v2 API client librariesFor more information about this feature, visithttps://cloud.google.com/run/docs/configuring/healthchecksPiperOrigin-RevId: 481203788Source-Link:googleapis/googleapis@778762cSource-Link:https://github.com/googleapis/googleapis-gen/commit/1479c7a63fc7d5b5d98c48e9ba1d0b6a94e95513Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTQ3OWM3YTYzZmM3ZDViNWQ5OGM0OGU5YmExZDBiNmE5NGU5NTUxMyJ9* 🦉 Updates from OwlBot post-processorSeehttps://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.mdCo-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parente37f8ff commitd4d22ec

File tree

20 files changed

+3019
-73
lines changed

20 files changed

+3019
-73
lines changed

‎google/cloud/run_v2/__init__.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@
2525
from .types.k8s_minimportContainerPort
2626
from .types.k8s_minimportEnvVar
2727
from .types.k8s_minimportEnvVarSource
28+
from .types.k8s_minimportHTTPGetAction
29+
from .types.k8s_minimportHTTPHeader
30+
from .types.k8s_minimportProbe
2831
from .types.k8s_minimportResourceRequirements
2932
from .types.k8s_minimportSecretKeySelector
3033
from .types.k8s_minimportSecretVolumeSource
34+
from .types.k8s_minimportTCPSocketAction
3135
from .types.k8s_minimportVersionToPath
3236
from .types.k8s_minimportVolume
3337
from .types.k8s_minimportVolumeMount
@@ -69,11 +73,14 @@
6973
"ExecutionEnvironment",
7074
"GetRevisionRequest",
7175
"GetServiceRequest",
76+
"HTTPGetAction",
77+
"HTTPHeader",
7278
"IngressTraffic",
7379
"ListRevisionsRequest",
7480
"ListRevisionsResponse",
7581
"ListServicesRequest",
7682
"ListServicesResponse",
83+
"Probe",
7784
"ResourceRequirements",
7885
"Revision",
7986
"RevisionScaling",
@@ -83,6 +90,7 @@
8390
"SecretVolumeSource",
8491
"Service",
8592
"ServicesClient",
93+
"TCPSocketAction",
8694
"TrafficTarget",
8795
"TrafficTargetAllocationType",
8896
"TrafficTargetStatus",

‎google/cloud/run_v2/services/revisions/async_client.py‎

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@
3434
fromgoogle.apiimportlaunch_stage_pb2# type: ignore
3535
fromgoogle.api_coreimportoperation# type: ignore
3636
fromgoogle.api_coreimportoperation_async# type: ignore
37+
fromgoogle.cloud.locationimportlocations_pb2# type: ignore
3738
fromgoogle.cloud.run_v2.services.revisionsimportpagers
3839
fromgoogle.cloud.run_v2.typesimportcondition
3940
fromgoogle.cloud.run_v2.typesimportk8s_min
4041
fromgoogle.cloud.run_v2.typesimportrevision
4142
fromgoogle.cloud.run_v2.typesimportvendor_settings
43+
fromgoogle.longrunningimportoperations_pb2
4244
fromgoogle.protobufimportduration_pb2# type: ignore
4345
fromgoogle.protobufimporttimestamp_pb2# type: ignore
4446
from .transports.baseimportRevisionsTransport,DEFAULT_CLIENT_INFO
@@ -559,6 +561,169 @@ async def sample_delete_revision():
559561
# Done; return the response.
560562
returnresponse
561563

564+
asyncdeflist_operations(
565+
self,
566+
request:operations_pb2.ListOperationsRequest=None,
567+
*,
568+
retry:OptionalRetry=gapic_v1.method.DEFAULT,
569+
timeout:float=None,
570+
metadata:Sequence[Tuple[str,str]]= (),
571+
)->operations_pb2.ListOperationsResponse:
572+
r"""Lists operations that match the specified filter in the request.
573+
574+
Args:
575+
request (:class:`~.operations_pb2.ListOperationsRequest`):
576+
The request object. Request message for
577+
`ListOperations` method.
578+
retry (google.api_core.retry.Retry): Designation of what errors,
579+
if any, should be retried.
580+
timeout (float): The timeout for this request.
581+
metadata (Sequence[Tuple[str, str]]): Strings which should be
582+
sent along with the request as metadata.
583+
Returns:
584+
~.operations_pb2.ListOperationsResponse:
585+
Response message for ``ListOperations`` method.
586+
"""
587+
# Create or coerce a protobuf request object.
588+
# The request isn't a proto-plus wrapped type,
589+
# so it must be constructed via keyword expansion.
590+
ifisinstance(request,dict):
591+
request=operations_pb2.ListOperationsRequest(**request)
592+
593+
# Wrap the RPC method; this adds retry and timeout information,
594+
# and friendly error handling.
595+
rpc=gapic_v1.method.wrap_method(
596+
self._client._transport.list_operations,
597+
default_timeout=None,
598+
client_info=DEFAULT_CLIENT_INFO,
599+
)
600+
601+
# Certain fields should be provided within the metadata header;
602+
# add these here.
603+
metadata=tuple(metadata)+ (
604+
gapic_v1.routing_header.to_grpc_metadata((("name",request.name),)),
605+
)
606+
607+
# Send the request.
608+
response=awaitrpc(
609+
request,
610+
retry=retry,
611+
timeout=timeout,
612+
metadata=metadata,
613+
)
614+
615+
# Done; return the response.
616+
returnresponse
617+
618+
asyncdefget_operation(
619+
self,
620+
request:operations_pb2.GetOperationRequest=None,
621+
*,
622+
retry:OptionalRetry=gapic_v1.method.DEFAULT,
623+
timeout:float=None,
624+
metadata:Sequence[Tuple[str,str]]= (),
625+
)->operations_pb2.Operation:
626+
r"""Gets the latest state of a long-running operation.
627+
628+
Args:
629+
request (:class:`~.operations_pb2.GetOperationRequest`):
630+
The request object. Request message for
631+
`GetOperation` method.
632+
retry (google.api_core.retry.Retry): Designation of what errors,
633+
if any, should be retried.
634+
timeout (float): The timeout for this request.
635+
metadata (Sequence[Tuple[str, str]]): Strings which should be
636+
sent along with the request as metadata.
637+
Returns:
638+
~.operations_pb2.Operation:
639+
An ``Operation`` object.
640+
"""
641+
# Create or coerce a protobuf request object.
642+
# The request isn't a proto-plus wrapped type,
643+
# so it must be constructed via keyword expansion.
644+
ifisinstance(request,dict):
645+
request=operations_pb2.GetOperationRequest(**request)
646+
647+
# Wrap the RPC method; this adds retry and timeout information,
648+
# and friendly error handling.
649+
rpc=gapic_v1.method.wrap_method(
650+
self._client._transport.get_operation,
651+
default_timeout=None,
652+
client_info=DEFAULT_CLIENT_INFO,
653+
)
654+
655+
# Certain fields should be provided within the metadata header;
656+
# add these here.
657+
metadata=tuple(metadata)+ (
658+
gapic_v1.routing_header.to_grpc_metadata((("name",request.name),)),
659+
)
660+
661+
# Send the request.
662+
response=awaitrpc(
663+
request,
664+
retry=retry,
665+
timeout=timeout,
666+
metadata=metadata,
667+
)
668+
669+
# Done; return the response.
670+
returnresponse
671+
672+
asyncdefdelete_operation(
673+
self,
674+
request:operations_pb2.DeleteOperationRequest=None,
675+
*,
676+
retry:OptionalRetry=gapic_v1.method.DEFAULT,
677+
timeout:float=None,
678+
metadata:Sequence[Tuple[str,str]]= (),
679+
)->None:
680+
r"""Deletes a long-running operation.
681+
682+
This method indicates that the client is no longer interested
683+
in the operation result. It does not cancel the operation.
684+
If the server doesn't support this method, it returns
685+
`google.rpc.Code.UNIMPLEMENTED`.
686+
687+
Args:
688+
request (:class:`~.operations_pb2.DeleteOperationRequest`):
689+
The request object. Request message for
690+
`DeleteOperation` method.
691+
retry (google.api_core.retry.Retry): Designation of what errors,
692+
if any, should be retried.
693+
timeout (float): The timeout for this request.
694+
metadata (Sequence[Tuple[str, str]]): Strings which should be
695+
sent along with the request as metadata.
696+
Returns:
697+
None
698+
"""
699+
# Create or coerce a protobuf request object.
700+
# The request isn't a proto-plus wrapped type,
701+
# so it must be constructed via keyword expansion.
702+
ifisinstance(request,dict):
703+
request=operations_pb2.DeleteOperationRequest(**request)
704+
705+
# Wrap the RPC method; this adds retry and timeout information,
706+
# and friendly error handling.
707+
rpc=gapic_v1.method.wrap_method(
708+
self._client._transport.delete_operation,
709+
default_timeout=None,
710+
client_info=DEFAULT_CLIENT_INFO,
711+
)
712+
713+
# Certain fields should be provided within the metadata header;
714+
# add these here.
715+
metadata=tuple(metadata)+ (
716+
gapic_v1.routing_header.to_grpc_metadata((("name",request.name),)),
717+
)
718+
719+
# Send the request.
720+
awaitrpc(
721+
request,
722+
retry=retry,
723+
timeout=timeout,
724+
metadata=metadata,
725+
)
726+
562727
asyncdef__aenter__(self):
563728
returnself
564729

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp