Skip to content

Commit

Permalink
GITBOOK-254: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
mouuii authored and gitbook-bot committed Feb 6, 2025
1 parent 6cdb9ca commit 6c96e30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Binary file added .gitbook/assets/1738807842080.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -808,3 +808,11 @@ func (s *Server) InstallAPIs(restStorageProviders ...RESTStorageProvider) error
有一些资源附带的特殊方法,也会在这里注册进 storage:

<figure><img src="../../.gitbook/assets/1738806919607.png" alt=""><figcaption></figcaption></figure>

### Storage

看到这里,你应该知道了路由注册的原理,本质上就是通过资源的 gvk 先拼接 url,然后看看这个资源有没有实现 RESTful 接口:

<figure><img src="../../.gitbook/assets/1738807842080.png" alt=""><figcaption></figcaption></figure>

我们比较熟悉的 Pod 通过内嵌了个 REST 结构体,从而实现了 REST。

0 comments on commit 6c96e30

Please sign in to comment.