Skip to content

Commit

Permalink
change doc (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxiaoliang committed Apr 4, 2019
1 parent d06ae7f commit 77a20f9
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 73 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ Go chassis also has a service mesh solution https://github.com/go-mesh/mesher, i
You can check [plugins](https://github.com/go-chassis/go-chassis-plugins) to see more features

# Quick Start
You can see more documentations in [here](http://docs.go-chassis.com/)
You can see more documentations in [here](http://docs.go-chassis.com/),
this doc is for latest version of go chassis, if you want to see your version's doc,
follow [here](docs/README.md) to generate it

1. Install [go 1.10+](https://golang.org/doc/install)

Expand Down
3 changes: 0 additions & 3 deletions core/handler/transport_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ func TestTransportHandler_HandleRest(t *testing.T) {
i := &invocation.Invocation{}
i.Reply = &helloworld.HelloReply{}

i.Protocol = "highway"
i.Args = &helloworld.HelloRequest{Name: "peter"}

i.Endpoint = "127.0.0.1:9992"
i.Protocol = "rest"
h := &handler.TransportHandler{}
Expand Down
2 changes: 1 addition & 1 deletion core/tls/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestInit(t *testing.T) {
os.Setenv("CHASSIS_HOME", "/tmp")

yamlContent := "a:\n b:\n c: valueC\n d: valueD\n \ryamlkeytest1: test1"
chassisyamlContent := "APPLICATION_ID: CSE\n \ncse:\n service:\n registry:\n type: servicecenter\n protocols:\n highway:\n listenAddress: 127.0.0.1:8080\n \nssl:\n test.Consumer.certFile: test.cer\n test.Consumer.keyFile: test.key\n"
chassisyamlContent := "APPLICATION_ID: CSE\n \ncse:\n service:\n registry:\n type: servicecenter\n protocols:\n grpc:\n listenAddress: 127.0.0.1:8080\n \nssl:\n test.Consumer.certFile: test.cer\n test.Consumer.keyFile: test.key\n"
os.Args = append(os.Args, "--argument=cmdtest")

confdir := "/tmp/conf"
Expand Down
3 changes: 2 additions & 1 deletion docs/dev-guides/how-to-extend-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

---

框架默认支持http协议以及highway RPC 协议,用户可扩展自己的RPC协议,并使用RPCInvoker调用
框架支持[grpc协议](https://github.com/go-chassis/go-chassis-protocol)
用户可扩展自己的RPC协议,并使用RPCInvoker调用

## 如何实现

Expand Down
2 changes: 1 addition & 1 deletion docs/discovery/kube-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import _ "github.com/go-chassis/go-chassis-plugins/registry/kube"

If you set cse.service.Registry.serviceDiscovery.type as "kube", then "configPath" is necessary to comminucate with kubernetes cluster. The go-chassis consumer applications would find Endpoints and Services in cluster that provider applications deployed.

> NOTE: Provider applications with go-chassis must deploy itself as a Pod asscociate with Services. The Service ports must be named and the port name must be the form **\<protocol>[-\<suffix>]**. protocol can set to be `rest` or `highway` now.
> NOTE: Provider applications with go-chassis must deploy itself as a Pod asscociate with Services. The Service ports must be named and the port name must be the form **\<protocol>[-\<suffix>]**. protocol can set to be `rest` or `grpc` now.
```yaml
cse:
Expand Down
2 changes: 1 addition & 1 deletion docs/getstarted/writing-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (s *Server) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloRe
第一个参数表示你要向哪个协议注册,第三个为grpc serivce desc

```go
chassis.RegisterSchema("grpc", &Server{}, server.WithGRPCServiceDesc(&pb.Greeter_serviceDesc))
chassis.RegisterSchema("grpc", &Server{}, server.WithRPCServiceDesc(&pb.Greeter_serviceDesc))
```


Expand Down
2 changes: 1 addition & 1 deletion docs/intro/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Features
================================
- Pluggable registrator and discovery service: Support Service center,istio pilot and file based registry,fit both client side discovery and server side discovery pattern

- Pluggable Protocol: You can custom your own protocol, by default support http and highway(RPC)
- Pluggable Protocol: You can custom your own protocol

- Circuit breaker: Protect your service in runtime or on-demand

Expand Down
1 change: 0 additions & 1 deletion docs/user-guides/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ type Filter func([]*registry.MicroServiceInstance) []*registry.MicroServiceInsta
invoker.Invoke(ctx, "Server", "HelloServer", "SayHello",
&helloworld.HelloRequest{Name: "Peter"},
reply,
core.WithProtocol("highway"),
core.WithStrategy(loadbalance.StrategyRoundRobin),
core.WithFilters(
"zoneaware"
Expand Down
46 changes: 0 additions & 46 deletions docs/user-guides/go-java-highway.rst

This file was deleted.

14 changes: 0 additions & 14 deletions docs/user-guides/healthz.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ import _ "github.com/go-chassis/go-chassis/healthz/provider"
}
```

* Highway:

1. Schema: _chassis_highway_healthz
1. Operation: HighwayCheck
1. Response:
```proto
// The response message containing the microservice key
message Reply {
string appId = 1;
string serviceName = 2;
string version = 3;
}
```

### 客户端配置

客户端健康检查配置在chassis.yaml。
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guides/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## 配置

路由规则当前只支持在配置文件配置,支持rest和highway协议
路由规则当前只支持在配置文件配置。

#### Consumer配置

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guides/service-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Service Discovery与Registry只能选择其一进行配置
**type**
> *(optional, string)* 对接服务中心插件类型,默认为servicecenter,另外可选择pilotv2以及kube
**NOTE: 当使用kube registry时,发布的service需要指定port name为以下格式 [protocol]-[suffix],目前protocol只支持rest和highway。**
**NOTE: 当使用kube registry时,发布的service需要指定port name为以下格式 [protocol]-[suffix]**

**address**
> *(optional, bool)*服务中心地址 允许配置多个以逗号隔开,默认为空
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guides/strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ invoker.Invoke(ctx, "Server", "HelloServer", "SayHello",
&helloworld.HelloRequest{Name: "Peter"},
reply,
core.WithContentType("application/json"),
core.WithProtocol("highway"),
core.WithProtocol("grpc"),
core.WithStrategy(loadbalance.StrategyRoundRobin),
)
```
Expand Down

0 comments on commit 77a20f9

Please sign in to comment.