diff --git a/README.md b/README.md index a71168d75..ca238dc71 100755 --- a/README.md +++ b/README.md @@ -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) diff --git a/core/handler/transport_handler_test.go b/core/handler/transport_handler_test.go index 4bbe55f42..5c027e329 100755 --- a/core/handler/transport_handler_test.go +++ b/core/handler/transport_handler_test.go @@ -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{} diff --git a/core/tls/tls_test.go b/core/tls/tls_test.go index 4c2c4d86d..85bbdd654 100755 --- a/core/tls/tls_test.go +++ b/core/tls/tls_test.go @@ -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" diff --git a/docs/dev-guides/how-to-extend-protocol.md b/docs/dev-guides/how-to-extend-protocol.md index bfe4457ab..f8e2f3dc4 100755 --- a/docs/dev-guides/how-to-extend-protocol.md +++ b/docs/dev-guides/how-to-extend-protocol.md @@ -3,7 +3,8 @@ --- -框架默认支持http协议以及highway RPC 协议,用户可扩展自己的RPC协议,并使用RPCInvoker调用 +框架支持[grpc协议](https://github.com/go-chassis/go-chassis-protocol), +用户可扩展自己的RPC协议,并使用RPCInvoker调用 ## 如何实现 diff --git a/docs/discovery/kube-discovery.md b/docs/discovery/kube-discovery.md index e5a10de59..5c7b31e6f 100755 --- a/docs/discovery/kube-discovery.md +++ b/docs/discovery/kube-discovery.md @@ -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 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 can set to be `rest` or `grpc` now. ```yaml cse: diff --git a/docs/getstarted/writing-rpc.md b/docs/getstarted/writing-rpc.md index c516974fe..6bc3c4548 100755 --- a/docs/getstarted/writing-rpc.md +++ b/docs/getstarted/writing-rpc.md @@ -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)) ``` diff --git a/docs/intro/features.rst b/docs/intro/features.rst index 98ebdc3bd..b71284216 100755 --- a/docs/intro/features.rst +++ b/docs/intro/features.rst @@ -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 diff --git a/docs/user-guides/filter.md b/docs/user-guides/filter.md index e6b22bb31..91bc7f51c 100755 --- a/docs/user-guides/filter.md +++ b/docs/user-guides/filter.md @@ -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" diff --git a/docs/user-guides/go-java-highway.rst b/docs/user-guides/go-java-highway.rst deleted file mode 100755 index 65bd104cb..000000000 --- a/docs/user-guides/go-java-highway.rst +++ /dev/null @@ -1,46 +0,0 @@ -Communication between GO consumer and JAVA provider -========================================================================== -this guide demonstrate how to use highway to communicate with java chassis -GO consumer -~~~~~~~~~~~ -Go consumer uses invoker.Invoker() call to make highway communication - - -.. image:: images/AddAndShowEmployee.png - :alt: Go Consumer -` - Parameters of Invoke: - 1) Context - 2) MicroserviceName - 3) SchemaID - 4) operationID - 5) Input argument - 6) Response argument - ` - - In the employ.bp.go file the structure EmployeeStruct is been used as the input argument and Response argument - - .. image:: images/EmployeeStruct.png - :alt: EmployeeStruct - -Java provider: -~~~~~~~~~~~~ -Microservicename is the name provider in the microservice.yaml file . In this example it is "springboot". - - .. image:: images/microservice.png - :alt: microservice.yaml - - -SchemaId is the schemaID defined in the java provider. In this example it is "hello". - -OperationId is the OperationName in the java provider. In this example it is "addAndShowEmploy". - -.. image:: images/helloservice.png - :alt: helloservice.png - - -Employ class which has the member variables "Name" and "Phone" is used as input parameter for the operation and also response for this api. - - - .. image:: images/Employ.png - :alt: Employ diff --git a/docs/user-guides/healthz.md b/docs/user-guides/healthz.md index a74f15175..1c9d12123 100755 --- a/docs/user-guides/healthz.md +++ b/docs/user-guides/healthz.md @@ -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。 diff --git a/docs/user-guides/router.md b/docs/user-guides/router.md index 091d83f40..f719f1b7c 100755 --- a/docs/user-guides/router.md +++ b/docs/user-guides/router.md @@ -7,7 +7,7 @@ ## 配置 -路由规则当前只支持在配置文件配置,支持rest和highway协议。 +路由规则当前只支持在配置文件配置。 #### Consumer配置 diff --git a/docs/user-guides/service-discovery.md b/docs/user-guides/service-discovery.md index 24f9c7570..7522c7a7e 100755 --- a/docs/user-guides/service-discovery.md +++ b/docs/user-guides/service-discovery.md @@ -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)*服务中心地址 允许配置多个以逗号隔开,默认为空 diff --git a/docs/user-guides/strategy.md b/docs/user-guides/strategy.md index 1f5a2ee56..ecc6a5d00 100755 --- a/docs/user-guides/strategy.md +++ b/docs/user-guides/strategy.md @@ -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), ) ```