Skip to content

feat(golang): write docs for probe#3193

Open
Alanxtl wants to merge 1 commit intoapache:masterfrom
Alanxtl:probe
Open

feat(golang): write docs for probe#3193
Alanxtl wants to merge 1 commit intoapache:masterfrom
Alanxtl:probe

Conversation

@Alanxtl
Copy link
Copy Markdown
Contributor

@Alanxtl Alanxtl commented Feb 13, 2026

No description provided.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 13, 2026

Deploy Preview for dubbo ready!

Name Link
🔨 Latest commit 57463a7
🔍 Latest deploy log https://app.netlify.com/projects/dubbo/deploys/698f22e738263c000852ccfe
😎 Deploy Preview https://deploy-preview-3193--dubbo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 26 (🔴 down 8 from production)
Accessibility: 84 (no change from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 85 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@AlexStocks AlexStocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档内容比较完整,涵盖了 Kubernetes 探针的各个方面。发现几个问题:

  1. 标题格式不规范:# 1️⃣# 2️⃣ 这种带 emoji 的标题在某些 markdown 渲染器中显示效果不一致,建议使用标准标题格式。

  2. 「内部状态机制」部分提到了 probe.SetReady(true/false)probe.SetStartupComplete(true/false),但没有给出具体的代码调用示例,读者不知道如何手动控制这些状态。

  3. 「生产最佳实践」部分表格内容较泛,可以补充具体配置参数建议,比如 liveness 的 initialDelaySeconds 推荐值、startup 的 failureThreshold 计算公式等。


| Option | Description |
| ------------------------------- | ------------------------------------- |
| WithProbeEnabled() | Enable Probe |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

标题 # 1️⃣ 使用 emoji 可能导致某些 markdown 渲染器显示异常,建议改成 ### 1. New API Configuration 这种标准格式。

When:

```yaml
use-internal-state: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAML 配置中 port: "22222" 用了字符串,但 New API 配置里 WithProbePort(22222) 用的是整数。这种类型不一致可能导致用户困惑,建议统一或者说明原因。

## Default Behavior

* When `Server.Serve()` executes successfully:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里说 readiness 依赖 probe.SetReady(true/false),但没有给出调用示例。比如用户想在某个依赖服务不可用时主动标记不健康,应该怎么调用?建议补充代码示例。

---

## 可用 Option

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同英文版,标题 # 1️⃣ 使用 emoji 可能导致渲染问题。

Copy link
Copy Markdown
Contributor

@AlexStocks AlexStocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档内容比较完整,涵盖了 Kubernetes 探针的各个方面。发现几个问题:

1. 标题格式混乱:

  • 第 75 行和第 105 行用「# 1️⃣」「# 2️⃣」带 emoji 的标题
  • 但前面的章节(第 31、42、69 行)用的是标准「# 1.」「# 2.」格式
  • 导致目录层级显示不一致

2. YAML/Go API 类型不一致:
第 110 行的 YAML 配置里 port: "22222" 用了字符串,但 New API 的 Go 代码里 WithProbePort(22222) 用的是整数。这种类型差异可能导致用户困惑。

3. 缺少手动控制状态示例:
第 149-150 行提到 readiness 依赖 probe.SetReady(true/false)、startup 依赖 probe.SetStartupComplete(true/false),但没有给出调用示例。比如用户想在某个依赖服务不可用时主动标记不健康,应该怎么调用?

4. 生产最佳实践不够具体:
表格只说了建议方向,没有给出具体参数推荐值(如 liveness 的 initialDelaySeconds 推荐范围、startup 的 failureThreshold 计算公式等)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants