forked from sofastack/sofa-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore:move package * chore:rename package * test:add test case for grpc * chore:organize import * chore:fix format * test:fix test case * chore:fix cr
- Loading branch information
1 parent
4166ae2
commit db18a70
Showing
15 changed files
with
257 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,22 +14,20 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.alipay.sofa.rpc.grpc.registry; | ||
package com.alipay.sofa.rpc.grpc; | ||
|
||
import com.alipay.sofa.rpc.common.RpcConstants; | ||
import com.alipay.sofa.rpc.config.RegistryConfig; | ||
import com.alipay.sofa.rpc.config.ConsumerConfig; | ||
import com.alipay.sofa.rpc.grpc.registry.GreeterImpl; | ||
import com.alipay.sofa.rpc.log.Logger; | ||
import com.alipay.sofa.rpc.log.LoggerFactory; | ||
|
||
import io.grpc.StatusRuntimeException; | ||
import io.grpc.examples.helloworld.GreeterGrpc; | ||
import io.grpc.examples.helloworld.GreeterGrpc; | ||
import io.grpc.examples.helloworld.HelloReply; | ||
import io.grpc.examples.helloworld.HelloRequest; | ||
|
||
import java.time.format.DateTimeFormatter; | ||
import java.time.LocalDateTime; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Luan Yanqiang</a> | ||
|
@@ -48,7 +46,7 @@ public static void main(String[] args) { | |
|
||
ConsumerConfig<GreeterGrpc.GreeterBlockingStub> consumerConfig = new ConsumerConfig<GreeterGrpc.GreeterBlockingStub>(); | ||
consumerConfig.setInterfaceId(GreeterGrpc.class.getName()) | ||
.setProtocol("grpc") | ||
.setProtocol(RpcConstants.PROTOCOL_TYPE_GRPC) | ||
.setRegistry(registryConfig); | ||
|
||
// GreeterGrpc.GreeterBlockingStub s = new | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...main/resources/META-INF/services/sofa-rpc/com.alipay.sofa.rpc.bootstrap.ConsumerBootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
grpc=com.dib.sofa.rpc.bootstrap.grpc.GrpcConsumerBootstrap | ||
grpc=com.alipay.sofa.rpc.bootstrap.grpc.GrpcConsumerBootstrap |
2 changes: 1 addition & 1 deletion
2
...main/resources/META-INF/services/sofa-rpc/com.alipay.sofa.rpc.bootstrap.ProviderBootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
grpc=com.dib.sofa.rpc.bootstrap.grpc.GrpcProviderBootstrap | ||
grpc=com.alipay.sofa.rpc.bootstrap.grpc.GrpcProviderBootstrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.