Skip to content

Commit

Permalink
docs: add websocket docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxu19830126 committed Aug 22, 2018
1 parent 1ad5e3b commit ee40d35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Gateway 是一个基于HTTP协议的restful的API网关。可以作为统一的A
* API 失败重试
* 后端server的健康检查
* 开放管理API(GRPC、Restful)
* 支持websocket

## Docker
使用 `docker pull fagongzi/gateway` 命令下载Docker镜像, 使用 `docker run -d fagongzi/gateway` 运行镜像. 镜像启动后export 3个端口:
Expand Down
5 changes: 4 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ API的默认返回值,当后端Cluster无可用Server的时候,Gateway将返

## Position(可选)

API匹配时按该值的升序匹配,即值越小优先级越高。默认值为0.
API匹配时按该值的升序匹配,即值越小优先级越高。默认值为0

## Tags(可选)
给API加上Tag标签,便于维护和检索。

## WebSocketOptions(可选)
websocket选项,设置该API为`websocket`,注意:`websocket特性还处于试验阶段,默认关闭,可以使用--websocket启用特性`。网关转发websocket的时候,`Origin`默认使用后端Server的地址,如果需要设置特殊值,可以指定`Origin`参数。

0 comments on commit ee40d35

Please sign in to comment.