@@ -405,6 +405,12 @@ export interface ServiceSpec {
405405 */
406406 env ?: Array < Shared . EnvironmentVariableItem > ;
407407
408+ /**
409+ * readiness_timeout is the maximum duration a service may remain in the Starting
410+ * phase while readiness checks run. 0s disables the timeout.
411+ */
412+ readinessTimeout ?: string ;
413+
408414 /**
409415 * runs_on specifies the environment the service should run on.
410416 */
@@ -574,6 +580,67 @@ export namespace ServiceUpdateParams {
574580
575581 env ?: Array < Shared . EnvironmentVariableItem > ;
576582
583+ /**
584+ * A Duration represents a signed, fixed-length span of time represented as a count
585+ * of seconds and fractions of seconds at nanosecond resolution. It is independent
586+ * of any calendar and concepts like "day" or "month". It is related to Timestamp
587+ * in that the difference between two Timestamp values is a Duration and it can be
588+ * added or subtracted from a Timestamp. Range is approximately +-10,000 years.
589+ *
590+ * # Examples
591+ *
592+ * Example 1: Compute Duration from two Timestamps in pseudo code.
593+ *
594+ * Timestamp start = ...;
595+ * Timestamp end = ...;
596+ * Duration duration = ...;
597+ *
598+ * duration.seconds = end.seconds - start.seconds;
599+ * duration.nanos = end.nanos - start.nanos;
600+ *
601+ * if (duration.seconds < 0 && duration.nanos > 0) {
602+ * duration.seconds += 1;
603+ * duration.nanos -= 1000000000;
604+ * } else if (duration.seconds > 0 && duration.nanos < 0) {
605+ * duration.seconds -= 1;
606+ * duration.nanos += 1000000000;
607+ * }
608+ *
609+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
610+ *
611+ * Timestamp start = ...;
612+ * Duration duration = ...;
613+ * Timestamp end = ...;
614+ *
615+ * end.seconds = start.seconds + duration.seconds;
616+ * end.nanos = start.nanos + duration.nanos;
617+ *
618+ * if (end.nanos < 0) {
619+ * end.seconds -= 1;
620+ * end.nanos += 1000000000;
621+ * } else if (end.nanos >= 1000000000) {
622+ * end.seconds += 1;
623+ * end.nanos -= 1000000000;
624+ * }
625+ *
626+ * Example 3: Compute Duration from datetime.timedelta in Python.
627+ *
628+ * td = datetime.timedelta(days=3, minutes=10)
629+ * duration = Duration()
630+ * duration.FromTimedelta(td)
631+ *
632+ * # JSON Mapping
633+ *
634+ * In JSON format, the Duration type is encoded as a string rather than an object,
635+ * where the string ends in the suffix "s" (indicating seconds) and is preceded by
636+ * the number of seconds, with nanoseconds expressed as fractional seconds. For
637+ * example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s",
638+ * while 3 seconds and 1 nanosecond should be expressed in JSON format as
639+ * "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON
640+ * format as "3.000001s".
641+ */
642+ readinessTimeout ?: string ;
643+
577644 runsOn ?: Shared . RunsOn | null ;
578645 }
579646
0 commit comments