Source code for jdcloud_sdk.services.pod.models.Probe

# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# 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
#
#     http://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.
#
# NOTE: This class is auto generated by the jdcloud code generator program.


[docs]class Probe(object): def __init__(self, initialDelaySeconds=None, periodSeconds=None, timeoutSeconds=None, failureThreshold=None, successThreshold=None, exec_=None, httpGet=None, tcpSocket=None): """ :param initialDelaySeconds: (Optional) 容器启动多久后触发探针。 :param periodSeconds: (Optional) 探测的时间间隔。 :param timeoutSeconds: (Optional) 探测的超时时间。 :param failureThreshold: (Optional) 在成功状态后,连续探活失败的次数,认为探活失败。 :param successThreshold: (Optional) 在失败状态后,连续探活成功的次数,认为探活成功。 :param exec_: (Optional) 在容器内执行指定命令;如果命令退出时返回码为 0 则认为诊断成功。 :param httpGet: (Optional) 对指定的端口和路径上的容器的 IP 地址执行 HTTP Get 请求。如果响应的状态码大于等于 200 且小于 400,则认为诊断成功。 :param tcpSocket: (Optional) 对指定端口上的容器的 IP 地址进行 TCP 检查;如果端口打开,则认为诊断成功。 """ self.initialDelaySeconds = initialDelaySeconds self.periodSeconds = periodSeconds self.timeoutSeconds = timeoutSeconds self.failureThreshold = failureThreshold self.successThreshold = successThreshold self.exec_ = exec_ self.httpGet = httpGet self.tcpSocket = tcpSocket