Skip to content

Commit

Permalink
feat(mesh): add sam
Browse files Browse the repository at this point in the history
  • Loading branch information
xujianhai666 committed Apr 5, 2020
1 parent 1b7ac91 commit 28cf188
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions posts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Controller#handleEvent -> handleSvcAdd -> #tryEnsureProc ->
<li>通过 unix domain socket 向之前的proxy 发送fd迁移通知, 老的proxy循环所有的proc 关闭监听</li>
<li>通过 unix domain socket 向之前的proxy 发送关闭通知. 老的proxy系统调用kill自杀</li>
</ul>
<p>那么怎么知道老的proxy的端口呢?</p>
<p>在 hack/hot-restart.py 中, 启动的时候, 会将proxy的地址放到环境变量中: <code>__Samaritan_Parent__</code></p>
]]></content>
</item>

Expand Down
6 changes: 4 additions & 2 deletions posts/proxy_sam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
Controller#handleEvent -&gt; handleSvcAdd -&gt; #tryEnsureProc -&gt; newProc(controller.">
<meta itemprop="datePublished" content="2020-04-05T09:42:10&#43;08:00" />
<meta itemprop="dateModified" content="2020-04-05T09:42:10&#43;08:00" />
<meta itemprop="wordCount" content="250">
<meta itemprop="wordCount" content="257">
<meta itemprop="image" content="https://xujianhai.fun/"/>


Expand Down Expand Up @@ -187,6 +187,8 @@ <h4 id="不错的实现">不错的实现</h4>
<li>通过 unix domain socket 向之前的proxy 发送fd迁移通知, 老的proxy循环所有的proc 关闭监听</li>
<li>通过 unix domain socket 向之前的proxy 发送关闭通知. 老的proxy系统调用kill自杀</li>
</ul>
<p>那么怎么知道老的proxy的端口呢?</p>
<p>在 hack/hot-restart.py 中, 启动的时候, 会将proxy的地址放到环境变量中: <code>__Samaritan_Parent__</code></p>

</div>
</article>
Expand All @@ -198,7 +200,7 @@ <h4 id="不错的实现">不错的实现</h4>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-tag meta-icon"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7" y2="7"></line></svg><span class="tag"><a href="https://xujianhai.fun/tags/sam">sam</a></span>
</p>

<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>250 Words</p>
<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>257 Words</p>

<p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>2020-04-05 09:42 &#43;0800</p>
</div>
Expand Down

0 comments on commit 28cf188

Please sign in to comment.