-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
客户端:http 客户端 #28
Comments
task 接口是给用户用的,他们提供实现 |
Mutex 里面注册 POST,GET 和 DELETE 三个路由。不能使用 GIN 之类的接口。 |
在根目录下新建一个 client 的包,项目结构是: |
大体上是不是这样子? func (s *Registry) Register(t Task) { type Client struct { func (c *Client) HttpMutex() http.Handler { // 用户使用 |
对 |
在我们的设计里面,调度节点可以通过 HTTP 调用触发任务。那么如果我们要求用户自己手写 HTTP 接口也是可以的。但是很多用户可能会比较不耐烦,所以我们进一步提供客户端。
这个客户端提供以下接口:
你需要提供的基本实现是:
The text was updated successfully, but these errors were encountered: