DMwangnima commented on code in PR #2450:
URL: https://github.com/apache/dubbo-go/pull/2450#discussion_r1368093626
##########
protocol/triple/triple-tool/internal/proto/greettriple/greet.triple.go:
##########
@@ -0,0 +1,386 @@
+// Code generated by protoc-gen-triple. DO NOT EDIT.
+//
+// Source: internal/proto/greet.proto
+package greettriple
+
+import (
+ context "context"
+ http "net/http"
+)
+
+import (
+ client "dubbo.apache.org/dubbo-go/v3/client"
+ "dubbo.apache.org/dubbo-go/v3/common"
+ "dubbo.apache.org/dubbo-go/v3/common/constant"
+ "dubbo.apache.org/dubbo-go/v3/config"
Review Comment:
ditto.
##########
protocol/triple/triple-tool/internal/proto/greettriple/greet.triple.go:
##########
@@ -0,0 +1,386 @@
+// Code generated by protoc-gen-triple. DO NOT EDIT.
+//
+// Source: internal/proto/greet.proto
+package greettriple
+
+import (
+ context "context"
+ http "net/http"
+)
+
+import (
+ client "dubbo.apache.org/dubbo-go/v3/client"
+ "dubbo.apache.org/dubbo-go/v3/common"
Review Comment:
remove this import.
##########
protocol/triple/triple-tool/internal/proto/greettriple/greet.triple.go:
##########
@@ -0,0 +1,386 @@
+// Code generated by protoc-gen-triple. DO NOT EDIT.
+//
+// Source: internal/proto/greet.proto
+package greettriple
+
+import (
+ context "context"
+ http "net/http"
+)
+
+import (
+ client "dubbo.apache.org/dubbo-go/v3/client"
+ "dubbo.apache.org/dubbo-go/v3/common"
+ "dubbo.apache.org/dubbo-go/v3/common/constant"
+ "dubbo.apache.org/dubbo-go/v3/config"
+ triple_protocol
"dubbo.apache.org/dubbo-go/v3/protocol/triple/triple_protocol"
+ "dubbo.apache.org/dubbo-go/v3/server"
+)
+
+import (
+ proto "dubbo.apache.org/dubbo-go/v3/triple-tool/internal/proto"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the
Triple package
+// are compatible. If you get a compiler error that this constant is not
defined, this code was
+// generated with a version ofTtriple newer than the one compiled into your
binary. You can fix the
+// problem by either regenerating this code with an older version of Triple or
updating the Triple
+// version compiled into your binary.
+const _ = triple_protocol.IsAtLeastVersion0_1_0
+
+const (
+ // GreetServiceName is the fully-qualified name of the GreetService
service.
+ GreetServiceName = "greet.GreetService"
+)
+
+// These constants are the fully-qualified names of the RPCs defined in this
package. They're
+// exposed at runtime as Spec.Procedure and as the final two segments of the
HTTP route.
+//
+// Note that these are different from the fully-qualified method names used by
+// google.golang.org/protobuf/reflect/protoreflect. To convert from these
constants to
+// reflection-formatted method names, remove the leading slash and convert the
remaining slash to a
+// period.
+const (
+ // GreetServiceGreetProcedure is the fully-qualified name of the
GreetService's Greet RPC.
+ GreetServiceGreetProcedure = "/greet.GreetService/Greet"
+ // GreetServiceGreetStreamProcedure is the fully-qualified name of the
GreetService's GreetStream RPC.
+ GreetServiceGreetStreamProcedure = "/greet.GreetService/GreetStream"
+ // GreetServiceGreetClientStreamProcedure is the fully-qualified name
of the GreetService's GreetClientStream RPC.
+ GreetServiceGreetClientStreamProcedure =
"/greet.GreetService/GreetClientStream"
+ // GreetServiceGreetServerStreamProcedure is the fully-qualified name
of the GreetService's GreetServerStream RPC.
+ GreetServiceGreetServerStreamProcedure =
"/greet.GreetService/GreetServerStream"
+)
+
+var (
+ _ GreetService = (*GreetServiceImpl)(nil)
+
+ _ GreetService_GreetStreamClient =
(*GreetServiceGreetStreamClient)(nil)
+ _ GreetService_GreetClientStreamClient =
(*GreetServiceGreetClientStreamClient)(nil)
+ _ GreetService_GreetServerStreamClient =
(*GreetServiceGreetServerStreamClient)(nil)
+
+ _ GreetService_GreetStreamServer =
(*GreetServiceGreetStreamServer)(nil)
+ _ GreetService_GreetClientStreamServer =
(*GreetServiceGreetClientStreamServer)(nil)
+ _ GreetService_GreetServerStreamServer =
(*GreetServiceGreetServerStreamServer)(nil)
+)
+
+//GreetService is a client for the greet.GreetService service.
+type GreetService interface {
+ Greet(ctx context.Context, req *proto.GreetRequest, opt
...client.CallOption) (*proto.GreetResponse, error)
+
+ GreetStream(ctx context.Context, opt ...client.CallOption)
(GreetService_GreetStreamClient, error)
+
+ GreetClientStream(ctx context.Context, opt ...client.CallOption)
(GreetService_GreetClientStreamClient, error)
+
+ GreetServerStream(ctx context.Context, req
*proto.GreetServerStreamRequest, opt ...client.CallOption)
(GreetService_GreetServerStreamClient, error)
+}
+
+// NewGreetService constructs a client for the greet.GreetService service. By
default, it uses
+// the Connect protocol with the binary Protobuf Codec, asks for gzipped
responses, and sends
+// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
connect.WithGRPC() or
+// connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Triple server (for
example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewGreetService(cli *client.Client) (GreetService, error) {
+ if err := cli.Init(&GreetService_ClientInfo); err != nil {
+ return nil, err
+ }
+ return &GreetServiceImpl{
+ cli: cli,
+ }, nil
+}
+
+func SetConsumerService(srv common.RPCService) {
Review Comment:
Since we have not figured out how to configure with dubbogo.yml. We should
remove this statement.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]