diff --git a/admin/src/views/Dashboard/KVPairs/_Components/DialogTopicDetail.vue b/admin/src/views/Dashboard/KVPairs/_Components/DialogTopicDetail.vue index f97df76..a0c77fa 100644 --- a/admin/src/views/Dashboard/KVPairs/_Components/DialogTopicDetail.vue +++ b/admin/src/views/Dashboard/KVPairs/_Components/DialogTopicDetail.vue @@ -5,7 +5,7 @@ diff --git a/client/dtmgrpc/dtmgpb/dtmgimp.pb.go b/client/dtmgrpc/dtmgpb/dtmgimp.pb.go index 5b4b918..6a0b8a5 100644 --- a/client/dtmgrpc/dtmgpb/dtmgimp.pb.go +++ b/client/dtmgrpc/dtmgpb/dtmgimp.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.5 +// protoc v3.15.6 // source: client/dtmgrpc/dtmgpb/dtmgimp.proto package dtmgpb @@ -745,7 +745,7 @@ var file_client_dtmgrpc_dtmgpb_dtmgimp_proto_rawDesc = []byte{ 0x64, 0x74, 0x6d, 0x67, 0x69, 0x6d, 0x70, 0x2e, 0x44, 0x74, 0x6d, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x55, 0x6e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x00, 0x12, 0x41, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x18, 0x2e, 0x64, 0x74, 0x6d, 0x67, 0x69, 0x6d, 0x70, 0x2e, 0x44, 0x74, 0x6d, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, @@ -798,7 +798,7 @@ var file_client_dtmgrpc_dtmgpb_dtmgimp_proto_depIdxs = []int32{ 3, // 10: dtmgimp.Dtm.RegisterBranch:input_type -> dtmgimp.DtmBranchRequest 1, // 11: dtmgimp.Dtm.PrepareWorkflow:input_type -> dtmgimp.DtmRequest 7, // 12: dtmgimp.Dtm.Subscribe:input_type -> dtmgimp.DtmTopicRequest - 7, // 13: dtmgimp.Dtm.UnSubscribe:input_type -> dtmgimp.DtmTopicRequest + 7, // 13: dtmgimp.Dtm.Unsubscribe:input_type -> dtmgimp.DtmTopicRequest 7, // 14: dtmgimp.Dtm.DeleteTopic:input_type -> dtmgimp.DtmTopicRequest 2, // 15: dtmgimp.Dtm.NewGid:output_type -> dtmgimp.DtmGidReply 11, // 16: dtmgimp.Dtm.Submit:output_type -> google.protobuf.Empty @@ -807,7 +807,7 @@ var file_client_dtmgrpc_dtmgpb_dtmgimp_proto_depIdxs = []int32{ 11, // 19: dtmgimp.Dtm.RegisterBranch:output_type -> google.protobuf.Empty 4, // 20: dtmgimp.Dtm.PrepareWorkflow:output_type -> dtmgimp.DtmProgressesReply 11, // 21: dtmgimp.Dtm.Subscribe:output_type -> google.protobuf.Empty - 11, // 22: dtmgimp.Dtm.UnSubscribe:output_type -> google.protobuf.Empty + 11, // 22: dtmgimp.Dtm.Unsubscribe:output_type -> google.protobuf.Empty 11, // 23: dtmgimp.Dtm.DeleteTopic:output_type -> google.protobuf.Empty 15, // [15:24] is the sub-list for method output_type 6, // [6:15] is the sub-list for method input_type diff --git a/client/dtmgrpc/dtmgpb/dtmgimp.proto b/client/dtmgrpc/dtmgpb/dtmgimp.proto index 770ce58..90430b0 100644 --- a/client/dtmgrpc/dtmgpb/dtmgimp.proto +++ b/client/dtmgrpc/dtmgpb/dtmgimp.proto @@ -14,7 +14,7 @@ service Dtm { rpc RegisterBranch(DtmBranchRequest) returns (google.protobuf.Empty) {} rpc PrepareWorkflow(DtmRequest) returns (DtmProgressesReply) {} rpc Subscribe(DtmTopicRequest) returns (google.protobuf.Empty){} - rpc UnSubscribe(DtmTopicRequest) returns (google.protobuf.Empty){} + rpc Unsubscribe(DtmTopicRequest) returns (google.protobuf.Empty){} rpc DeleteTopic(DtmTopicRequest) returns (google.protobuf.Empty){} } diff --git a/client/dtmgrpc/dtmgpb/dtmgimp_grpc.pb.go b/client/dtmgrpc/dtmgpb/dtmgimp_grpc.pb.go index 071d8c8..2aaa5bc 100644 --- a/client/dtmgrpc/dtmgpb/dtmgimp_grpc.pb.go +++ b/client/dtmgrpc/dtmgpb/dtmgimp_grpc.pb.go @@ -30,7 +30,7 @@ type DtmClient interface { RegisterBranch(ctx context.Context, in *DtmBranchRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) PrepareWorkflow(ctx context.Context, in *DtmRequest, opts ...grpc.CallOption) (*DtmProgressesReply, error) Subscribe(ctx context.Context, in *DtmTopicRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - UnSubscribe(ctx context.Context, in *DtmTopicRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + Unsubscribe(ctx context.Context, in *DtmTopicRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteTopic(ctx context.Context, in *DtmTopicRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } @@ -105,9 +105,9 @@ func (c *dtmClient) Subscribe(ctx context.Context, in *DtmTopicRequest, opts ... return out, nil } -func (c *dtmClient) UnSubscribe(ctx context.Context, in *DtmTopicRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { +func (c *dtmClient) Unsubscribe(ctx context.Context, in *DtmTopicRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/dtmgimp.Dtm/UnSubscribe", in, out, opts...) + err := c.cc.Invoke(ctx, "/dtmgimp.Dtm/Unsubscribe", in, out, opts...) if err != nil { return nil, err } @@ -134,7 +134,7 @@ type DtmServer interface { RegisterBranch(context.Context, *DtmBranchRequest) (*emptypb.Empty, error) PrepareWorkflow(context.Context, *DtmRequest) (*DtmProgressesReply, error) Subscribe(context.Context, *DtmTopicRequest) (*emptypb.Empty, error) - UnSubscribe(context.Context, *DtmTopicRequest) (*emptypb.Empty, error) + Unsubscribe(context.Context, *DtmTopicRequest) (*emptypb.Empty, error) DeleteTopic(context.Context, *DtmTopicRequest) (*emptypb.Empty, error) mustEmbedUnimplementedDtmServer() } @@ -164,8 +164,8 @@ func (UnimplementedDtmServer) PrepareWorkflow(context.Context, *DtmRequest) (*Dt func (UnimplementedDtmServer) Subscribe(context.Context, *DtmTopicRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } -func (UnimplementedDtmServer) UnSubscribe(context.Context, *DtmTopicRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnSubscribe not implemented") +func (UnimplementedDtmServer) Unsubscribe(context.Context, *DtmTopicRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Unsubscribe not implemented") } func (UnimplementedDtmServer) DeleteTopic(context.Context, *DtmTopicRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTopic not implemented") @@ -309,20 +309,20 @@ func _Dtm_Subscribe_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } -func _Dtm_UnSubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Dtm_Unsubscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DtmTopicRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DtmServer).UnSubscribe(ctx, in) + return srv.(DtmServer).Unsubscribe(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/dtmgimp.Dtm/UnSubscribe", + FullMethod: "/dtmgimp.Dtm/Unsubscribe", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DtmServer).UnSubscribe(ctx, req.(*DtmTopicRequest)) + return srv.(DtmServer).Unsubscribe(ctx, req.(*DtmTopicRequest)) } return interceptor(ctx, in, info, handler) } @@ -381,8 +381,8 @@ var Dtm_ServiceDesc = grpc.ServiceDesc{ Handler: _Dtm_Subscribe_Handler, }, { - MethodName: "UnSubscribe", - Handler: _Dtm_UnSubscribe_Handler, + MethodName: "Unsubscribe", + Handler: _Dtm_Unsubscribe_Handler, }, { MethodName: "DeleteTopic", diff --git a/dtmsvr/api_grpc.go b/dtmsvr/api_grpc.go index 836c8d4..938a742 100644 --- a/dtmsvr/api_grpc.go +++ b/dtmsvr/api_grpc.go @@ -74,7 +74,7 @@ func (s *dtmServer) Subscribe(ctx context.Context, in *pb.DtmTopicRequest) (*emp return &emptypb.Empty{}, dtmgrpc.DtmError2GrpcError(Subscribe(in.Topic, in.URL, in.Remark)) } -func (s *dtmServer) UnSubscribe(ctx context.Context, in *pb.DtmTopicRequest) (*emptypb.Empty, error) { +func (s *dtmServer) Unsubscribe(ctx context.Context, in *pb.DtmTopicRequest) (*emptypb.Empty, error) { return &emptypb.Empty{}, dtmgrpc.DtmError2GrpcError(Unsubscribe(in.Topic, in.URL)) } diff --git a/test/topic_test.go b/test/topic_test.go index 40c498c..c9fbeda 100644 --- a/test/topic_test.go +++ b/test/topic_test.go @@ -136,7 +136,7 @@ func grpcSubscribe(topic, url string) error { } func grpcUnsubscribe(topic, url string) error { - _, err := dtmgimp.MustGetDtmClient(dtmutil.DefaultGrpcServer).UnSubscribe(context.Background(), + _, err := dtmgimp.MustGetDtmClient(dtmutil.DefaultGrpcServer).Unsubscribe(context.Background(), &dtmgpb.DtmTopicRequest{ Topic: topic, URL: url})