tikit
Advanced tools
+1
-1
| Metadata-Version: 1.0 | ||
| Name: tikit | ||
| Version: 1.9.5.251217 | ||
| Version: 1.9.5.260123 | ||
| Summary: Kit for TI PLATFORM | ||
@@ -5,0 +5,0 @@ Home-page: https://cloud.tencent.com/ |
+1
-1
@@ -18,3 +18,3 @@ from setuptools import setup, find_packages | ||
| name='tikit', | ||
| version='1.9.5.251217', | ||
| version='1.9.5.260123', | ||
| url='https://cloud.tencent.com/', | ||
@@ -21,0 +21,0 @@ license='MIT', |
| Metadata-Version: 1.0 | ||
| Name: tikit | ||
| Version: 1.9.5.251217 | ||
| Version: 1.9.5.260123 | ||
| Summary: Kit for TI PLATFORM | ||
@@ -5,0 +5,0 @@ Home-page: https://cloud.tencent.com/ |
+100
-0
@@ -1004,1 +1004,101 @@ # -*- coding: utf-8 -*- | ||
| return ret | ||
| class HTTPGetAction: | ||
| def __init__(self, path, port): | ||
| """ | ||
| :param path: http 路径 | ||
| :type path: str | ||
| :param port: 调用端口 | ||
| :type port: int | ||
| """ | ||
| self.Path = path | ||
| self.Port = port | ||
| class ExecAction: | ||
| def __init__(self, command): | ||
| """ | ||
| :param command: 执行的命令 | ||
| :type command: list[str] | ||
| """ | ||
| self.Command = command | ||
| class TCPSocketAction: | ||
| def __init__(self, port): | ||
| """ | ||
| :param port: 调用端口 | ||
| :type port: int | ||
| """ | ||
| self.Port = port | ||
| class ProbeAction: | ||
| def __init__(self, action_type, http_get=None, exec_action=None, tcp_socket=None): | ||
| """ | ||
| :param action_type: 探针类型,可选值:HTTPGet、Exec、TCPSocket | ||
| :type action_type: str | ||
| :param http_get: http get 行为 | ||
| :type http_get: :class:`tikit.models.HTTPGetAction` | ||
| :param exec_action: 执行命令检查 行为 | ||
| :type exec_action: :class:`tikit.models.ExecAction` | ||
| :param tcp_socket: tcp socket 检查行为 | ||
| :type tcp_socket: :class:`tikit.models.TCPSocketAction` | ||
| """ | ||
| self.ActionType = action_type | ||
| self.HTTPGet = http_get | ||
| self.Exec = exec_action | ||
| self.TCPSocket = tcp_socket | ||
| @staticmethod | ||
| def new_http_get(path, port): | ||
| return ProbeAction("HTTPGet", http_get=HTTPGetAction(path, port)) | ||
| @staticmethod | ||
| def new_exec(command): | ||
| return ProbeAction("Exec", exec_action=ExecAction(command)) | ||
| @staticmethod | ||
| def new_tcp_socket(port): | ||
| return ProbeAction("TCPSocket", tcp_socket=TCPSocketAction(port)) | ||
| class Probe: | ||
| def __init__(self, probe_action, initial_delay_seconds=None, period_seconds=None, timeout_seconds=None, | ||
| failure_threshold=None, success_threshold=None): | ||
| """ | ||
| :param probe_action: 探针行为 | ||
| :type probe_action: :class:`tikit.models.ProbeAction` | ||
| :param initial_delay_seconds: 等待服务启动的延迟 | ||
| :type initial_delay_seconds: int | ||
| :param period_seconds: 轮询检查时间间隔 | ||
| :type period_seconds: int | ||
| :param timeout_seconds: 检查超时时长 | ||
| :type timeout_seconds: int | ||
| :param failure_threshold: 检测失败认定次数 | ||
| :type failure_threshold: int | ||
| :param success_threshold: 检测成功认定次数 | ||
| :type success_threshold: int | ||
| """ | ||
| self.ProbeAction = probe_action | ||
| self.InitialDelaySeconds = initial_delay_seconds | ||
| self.PeriodSeconds = period_seconds | ||
| self.TimeoutSeconds = timeout_seconds | ||
| self.FailureThreshold = failure_threshold | ||
| self.SuccessThreshold = success_threshold | ||
| class HealthProbe: | ||
| def __init__(self, liveness_probe=None, readiness_probe=None, startup_probe=None): | ||
| """ | ||
| :param liveness_probe: 存活探针 | ||
| :type liveness_probe: :class:`tikit.models.Probe` | ||
| :param readiness_probe: 就绪探针 | ||
| :type readiness_probe: :class:`tikit.models.Probe` | ||
| :param startup_probe: 启动探针 | ||
| :type startup_probe: :class:`tikit.models.Probe` | ||
| """ | ||
| self.LivenessProbe = liveness_probe | ||
| self.ReadinessProbe = readiness_probe | ||
| self.StartupProbe = startup_probe |
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
4424996
0.18%113154
0.16%