# 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 ProbeSpec(object):
def __init__(self, initialDelaySeconds=None, periodSeconds=None, timeoutSeconds=None, failureThreshold=None, successThreshold=None, exec_=None, httpGet=None, tcpSocket=None):
"""
:param initialDelaySeconds: (Optional) 容器启动多长时间后,触发探针。默认值:10秒;范围:[0-300]
:param periodSeconds: (Optional) 探测的时间间隔。默认值 10秒,范围:[1-300]
:param timeoutSeconds: (Optional) 探测的超时时间。默认值 1秒;范围:[1-300]
:param failureThreshold: (Optional) 在成功状态后,连续探活失败的次数,认为探活失败。默认值 3次;范围:[1-10]
:param successThreshold: (Optional) 在失败状态后,连续探活成功的次数,认为探活成功。默认值 1次;范围:[1-10]
:param exec_: (Optional) 在容器内执行指定命令;如果命令退出时返回码为 0 则认为诊断成功。
:param httpGet: (Optional) 对指定的端口和路径上的容器的 IP 地址执行 HTTP Get 请求。<br>
如果响应的状态码大于等于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