diff --git a/Makefile b/Makefile index 1e4b97a..3aa53e2 100644 --- a/Makefile +++ b/Makefile @@ -11,9 +11,9 @@ proto: api/grpc/limits/*.proto \ api/grpc/permits/*.proto \ api/grpc/reader/*.proto \ + api/grpc/resolver/*.proto \ api/grpc/subject/*.proto \ - api/grpc/subscriptions/*.proto \ - api/grpc/writer/*.proto + api/grpc/subscriptions/*.proto vet: proto go vet diff --git a/README.md b/README.md index 1186737..c69ced6 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ func main() { NewClientBuilder(). ReaderUri("core-reader:50051"). // skip this line if reader API is not used SubscriptionsUri("core-subscriptionsproxy:50051"). // skip this line if subscriptions API is not used - WriterUri("core-writer:50051"). // skip this line if writer API is not used + WriterUri("core-resolver:50051"). // skip this line if writer API is not used Build() if err != nil { panic(err) diff --git a/api/builder.go b/api/builder.go index 3316d9f..ad29859 100644 --- a/api/builder.go +++ b/api/builder.go @@ -6,8 +6,8 @@ import ( "github.com/awakari/client-sdk-go/api/grpc/limits" "github.com/awakari/client-sdk-go/api/grpc/permits" "github.com/awakari/client-sdk-go/api/grpc/reader" + "github.com/awakari/client-sdk-go/api/grpc/resolver" "github.com/awakari/client-sdk-go/api/grpc/subscriptions" - "github.com/awakari/client-sdk-go/api/grpc/writer" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" @@ -162,10 +162,10 @@ func (b *builder) Build() (c Client, err error) { } else if b.apiUri != "" { connWriter, err = grpc.Dial(b.apiUri, optsDial...) } - var svcWriter writer.Service + var svcWriter resolver.Service if connWriter != nil { - clientWriter := writer.NewServiceClient(connWriter) - svcWriter = writer.NewService(clientWriter) + clientWriter := resolver.NewServiceClient(connWriter) + svcWriter = resolver.NewService(clientWriter) } // c = client{ diff --git a/api/client.go b/api/client.go index c4f4530..21c4873 100644 --- a/api/client.go +++ b/api/client.go @@ -7,8 +7,8 @@ import ( "github.com/awakari/client-sdk-go/api/grpc/limits" "github.com/awakari/client-sdk-go/api/grpc/permits" "github.com/awakari/client-sdk-go/api/grpc/reader" + "github.com/awakari/client-sdk-go/api/grpc/resolver" "github.com/awakari/client-sdk-go/api/grpc/subscriptions" - "github.com/awakari/client-sdk-go/api/grpc/writer" "github.com/awakari/client-sdk-go/model" "github.com/awakari/client-sdk-go/model/subscription" "github.com/awakari/client-sdk-go/model/usage" @@ -65,7 +65,7 @@ type client struct { svcReader reader.Service svcPermits permits.Service svcSubs subscriptions.Service - svcWriter writer.Service + svcWriter resolver.Service } var ErrApiDisabled = errors.New("the API call is not enabled for this client") diff --git a/api/client_test.go b/api/client_test.go index eaf6c08..e989314 100644 --- a/api/client_test.go +++ b/api/client_test.go @@ -6,9 +6,9 @@ import ( "github.com/awakari/client-sdk-go/api/grpc/limits" "github.com/awakari/client-sdk-go/api/grpc/permits" "github.com/awakari/client-sdk-go/api/grpc/reader" + "github.com/awakari/client-sdk-go/api/grpc/resolver" "github.com/awakari/client-sdk-go/api/grpc/subject" "github.com/awakari/client-sdk-go/api/grpc/subscriptions" - "github.com/awakari/client-sdk-go/api/grpc/writer" "github.com/awakari/client-sdk-go/model/subscription" "github.com/awakari/client-sdk-go/model/subscription/condition" "github.com/awakari/client-sdk-go/model/usage" @@ -243,7 +243,7 @@ func TestClient_ReadMessages(t *testing.T) { func TestClient_WriteMessages(t *testing.T) { cases := map[string]struct { - svcWriter writer.Service + svcWriter resolver.Service userId string err0 error msgs []*pb.CloudEvent @@ -255,17 +255,17 @@ func TestClient_WriteMessages(t *testing.T) { err0: ErrApiDisabled, }, "fail open stream": { - svcWriter: writer.NewServiceMock(), + svcWriter: resolver.NewServiceMock(), userId: "fail", - err0: writer.ErrInternal, + err0: resolver.ErrInternal, }, "fail auth": { - svcWriter: writer.NewServiceMock(), + svcWriter: resolver.NewServiceMock(), userId: "fail_auth", err0: auth.ErrAuth, }, "fail write": { - svcWriter: writer.NewServiceMock(), + svcWriter: resolver.NewServiceMock(), userId: "user0", msgs: []*pb.CloudEvent{ { @@ -276,10 +276,10 @@ func TestClient_WriteMessages(t *testing.T) { }, }, ackCount: 1, - err1: writer.ErrInternal, + err1: resolver.ErrInternal, }, "limit reached": { - svcWriter: writer.NewServiceMock(), + svcWriter: resolver.NewServiceMock(), userId: "user0", msgs: []*pb.CloudEvent{ { @@ -296,7 +296,7 @@ func TestClient_WriteMessages(t *testing.T) { err1: limits.ErrReached, }, "ok": { - svcWriter: writer.NewServiceMock(), + svcWriter: resolver.NewServiceMock(), userId: "user0", msgs: []*pb.CloudEvent{ { diff --git a/api/grpc/writer/client_mock.go b/api/grpc/resolver/client_mock.go similarity index 94% rename from api/grpc/writer/client_mock.go rename to api/grpc/resolver/client_mock.go index 9df49f0..fc1dd6c 100644 --- a/api/grpc/writer/client_mock.go +++ b/api/grpc/resolver/client_mock.go @@ -1,4 +1,4 @@ -package writer +package resolver import ( "context" diff --git a/api/grpc/writer/service.go b/api/grpc/resolver/service.go similarity index 98% rename from api/grpc/writer/service.go rename to api/grpc/resolver/service.go index 327d10b..29444cb 100644 --- a/api/grpc/writer/service.go +++ b/api/grpc/resolver/service.go @@ -1,4 +1,4 @@ -package writer +package resolver import ( "context" diff --git a/api/grpc/writer/service.pb.go b/api/grpc/resolver/service.pb.go similarity index 60% rename from api/grpc/writer/service.pb.go rename to api/grpc/resolver/service.pb.go index ac02e88..3d2188f 100644 --- a/api/grpc/writer/service.pb.go +++ b/api/grpc/resolver/service.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.26.0 // protoc v3.21.12 -// source: api/grpc/writer/service.proto +// source: api/grpc/resolver/service.proto -package writer +package resolver import ( context "context" @@ -36,7 +36,7 @@ type SubmitMessagesRequest struct { func (x *SubmitMessagesRequest) Reset() { *x = SubmitMessagesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_grpc_writer_service_proto_msgTypes[0] + mi := &file_api_grpc_resolver_service_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +49,7 @@ func (x *SubmitMessagesRequest) String() string { func (*SubmitMessagesRequest) ProtoMessage() {} func (x *SubmitMessagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_grpc_writer_service_proto_msgTypes[0] + mi := &file_api_grpc_resolver_service_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +62,7 @@ func (x *SubmitMessagesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitMessagesRequest.ProtoReflect.Descriptor instead. func (*SubmitMessagesRequest) Descriptor() ([]byte, []int) { - return file_api_grpc_writer_service_proto_rawDescGZIP(), []int{0} + return file_api_grpc_resolver_service_proto_rawDescGZIP(), []int{0} } func (x *SubmitMessagesRequest) GetMsgs() []*pb.CloudEvent { @@ -83,7 +83,7 @@ type SubmitMessagesResponse struct { func (x *SubmitMessagesResponse) Reset() { *x = SubmitMessagesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_grpc_writer_service_proto_msgTypes[1] + mi := &file_api_grpc_resolver_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -96,7 +96,7 @@ func (x *SubmitMessagesResponse) String() string { func (*SubmitMessagesResponse) ProtoMessage() {} func (x *SubmitMessagesResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_grpc_writer_service_proto_msgTypes[1] + mi := &file_api_grpc_resolver_service_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109,7 +109,7 @@ func (x *SubmitMessagesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SubmitMessagesResponse.ProtoReflect.Descriptor instead. func (*SubmitMessagesResponse) Descriptor() ([]byte, []int) { - return file_api_grpc_writer_service_proto_rawDescGZIP(), []int{1} + return file_api_grpc_resolver_service_proto_rawDescGZIP(), []int{1} } func (x *SubmitMessagesResponse) GetAckCount() uint32 { @@ -119,55 +119,55 @@ func (x *SubmitMessagesResponse) GetAckCount() uint32 { return 0 } -var File_api_grpc_writer_service_proto protoreflect.FileDescriptor - -var file_api_grpc_writer_service_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x0e, 0x61, 0x77, 0x61, 0x6b, 0x61, 0x72, 0x69, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x1a, - 0x25, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x22, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x6d, - 0x73, 0x67, 0x73, 0x22, 0x34, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x08, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x6e, 0x0a, 0x07, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x61, 0x77, 0x61, 0x6b, 0x61, 0x72, 0x69, - 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, - 0x61, 0x77, 0x61, 0x6b, 0x61, 0x72, 0x69, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2e, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x11, 0x5a, 0x0f, 0x61, 0x70, 0x69, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, +var File_api_grpc_resolver_service_proto protoreflect.FileDescriptor + +var file_api_grpc_resolver_service_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x10, 0x61, 0x77, 0x61, 0x6b, 0x61, 0x72, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x1a, 0x25, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x15, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x22, 0x34, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x08, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x72, 0x0a, + 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x77, 0x61, + 0x6b, 0x61, 0x72, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x77, 0x61, 0x6b, 0x61, 0x72, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, + 0x01, 0x42, 0x13, 0x5a, 0x11, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_api_grpc_writer_service_proto_rawDescOnce sync.Once - file_api_grpc_writer_service_proto_rawDescData = file_api_grpc_writer_service_proto_rawDesc + file_api_grpc_resolver_service_proto_rawDescOnce sync.Once + file_api_grpc_resolver_service_proto_rawDescData = file_api_grpc_resolver_service_proto_rawDesc ) -func file_api_grpc_writer_service_proto_rawDescGZIP() []byte { - file_api_grpc_writer_service_proto_rawDescOnce.Do(func() { - file_api_grpc_writer_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_grpc_writer_service_proto_rawDescData) +func file_api_grpc_resolver_service_proto_rawDescGZIP() []byte { + file_api_grpc_resolver_service_proto_rawDescOnce.Do(func() { + file_api_grpc_resolver_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_grpc_resolver_service_proto_rawDescData) }) - return file_api_grpc_writer_service_proto_rawDescData + return file_api_grpc_resolver_service_proto_rawDescData } -var file_api_grpc_writer_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_api_grpc_writer_service_proto_goTypes = []interface{}{ - (*SubmitMessagesRequest)(nil), // 0: awakari.writer.SubmitMessagesRequest - (*SubmitMessagesResponse)(nil), // 1: awakari.writer.SubmitMessagesResponse +var file_api_grpc_resolver_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_api_grpc_resolver_service_proto_goTypes = []interface{}{ + (*SubmitMessagesRequest)(nil), // 0: awakari.resolver.SubmitMessagesRequest + (*SubmitMessagesResponse)(nil), // 1: awakari.resolver.SubmitMessagesResponse (*pb.CloudEvent)(nil), // 2: pb.CloudEvent } -var file_api_grpc_writer_service_proto_depIdxs = []int32{ - 2, // 0: awakari.writer.SubmitMessagesRequest.msgs:type_name -> pb.CloudEvent - 0, // 1: awakari.writer.Service.SubmitMessages:input_type -> awakari.writer.SubmitMessagesRequest - 1, // 2: awakari.writer.Service.SubmitMessages:output_type -> awakari.writer.SubmitMessagesResponse +var file_api_grpc_resolver_service_proto_depIdxs = []int32{ + 2, // 0: awakari.resolver.SubmitMessagesRequest.msgs:type_name -> pb.CloudEvent + 0, // 1: awakari.resolver.Service.SubmitMessages:input_type -> awakari.resolver.SubmitMessagesRequest + 1, // 2: awakari.resolver.Service.SubmitMessages:output_type -> awakari.resolver.SubmitMessagesResponse 2, // [2:3] is the sub-list for method output_type 1, // [1:2] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -175,13 +175,13 @@ var file_api_grpc_writer_service_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_api_grpc_writer_service_proto_init() } -func file_api_grpc_writer_service_proto_init() { - if File_api_grpc_writer_service_proto != nil { +func init() { file_api_grpc_resolver_service_proto_init() } +func file_api_grpc_resolver_service_proto_init() { + if File_api_grpc_resolver_service_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_api_grpc_writer_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_api_grpc_resolver_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubmitMessagesRequest); i { case 0: return &v.state @@ -193,7 +193,7 @@ func file_api_grpc_writer_service_proto_init() { return nil } } - file_api_grpc_writer_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_api_grpc_resolver_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubmitMessagesResponse); i { case 0: return &v.state @@ -210,20 +210,20 @@ func file_api_grpc_writer_service_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_grpc_writer_service_proto_rawDesc, + RawDescriptor: file_api_grpc_resolver_service_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_api_grpc_writer_service_proto_goTypes, - DependencyIndexes: file_api_grpc_writer_service_proto_depIdxs, - MessageInfos: file_api_grpc_writer_service_proto_msgTypes, + GoTypes: file_api_grpc_resolver_service_proto_goTypes, + DependencyIndexes: file_api_grpc_resolver_service_proto_depIdxs, + MessageInfos: file_api_grpc_resolver_service_proto_msgTypes, }.Build() - File_api_grpc_writer_service_proto = out.File - file_api_grpc_writer_service_proto_rawDesc = nil - file_api_grpc_writer_service_proto_goTypes = nil - file_api_grpc_writer_service_proto_depIdxs = nil + File_api_grpc_resolver_service_proto = out.File + file_api_grpc_resolver_service_proto_rawDesc = nil + file_api_grpc_resolver_service_proto_goTypes = nil + file_api_grpc_resolver_service_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. @@ -250,7 +250,7 @@ func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { } func (c *serviceClient) SubmitMessages(ctx context.Context, opts ...grpc.CallOption) (Service_SubmitMessagesClient, error) { - stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[0], "/awakari.writer.Service/SubmitMessages", opts...) + stream, err := c.cc.NewStream(ctx, &_Service_serviceDesc.Streams[0], "/awakari.resolver.Service/SubmitMessages", opts...) if err != nil { return nil, err } @@ -324,7 +324,7 @@ func (x *serviceSubmitMessagesServer) Recv() (*SubmitMessagesRequest, error) { } var _Service_serviceDesc = grpc.ServiceDesc{ - ServiceName: "awakari.writer.Service", + ServiceName: "awakari.resolver.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ @@ -335,5 +335,5 @@ var _Service_serviceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "api/grpc/writer/service.proto", + Metadata: "api/grpc/resolver/service.proto", } diff --git a/api/grpc/writer/service.proto b/api/grpc/resolver/service.proto similarity index 82% rename from api/grpc/writer/service.proto rename to api/grpc/resolver/service.proto index 7896591..5235f36 100644 --- a/api/grpc/writer/service.proto +++ b/api/grpc/resolver/service.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package awakari.writer; +package awakari.resolver; -option go_package = "api/grpc/writer"; +option go_package = "api/grpc/resolver"; import "api/grpc/cloudevents/cloudevent.proto"; diff --git a/api/grpc/writer/service_mock.go b/api/grpc/resolver/service_mock.go similarity index 96% rename from api/grpc/writer/service_mock.go rename to api/grpc/resolver/service_mock.go index 5e14cc0..800691f 100644 --- a/api/grpc/writer/service_mock.go +++ b/api/grpc/resolver/service_mock.go @@ -1,4 +1,4 @@ -package writer +package resolver import ( "context" diff --git a/api/grpc/writer/service_test.go b/api/grpc/resolver/service_test.go similarity index 98% rename from api/grpc/writer/service_test.go rename to api/grpc/resolver/service_test.go index e68b937..d93d5f9 100644 --- a/api/grpc/writer/service_test.go +++ b/api/grpc/resolver/service_test.go @@ -1,4 +1,4 @@ -package writer +package resolver import ( "context" diff --git a/api/grpc/writer/stream_mock.go b/api/grpc/resolver/stream_mock.go similarity index 98% rename from api/grpc/writer/stream_mock.go rename to api/grpc/resolver/stream_mock.go index b20aea1..c97effd 100644 --- a/api/grpc/writer/stream_mock.go +++ b/api/grpc/resolver/stream_mock.go @@ -1,4 +1,4 @@ -package writer +package resolver import ( "context" diff --git a/api/grpc/writer/stream_writer.go b/api/grpc/resolver/stream_writer.go similarity index 98% rename from api/grpc/writer/stream_writer.go rename to api/grpc/resolver/stream_writer.go index d883d8f..8583e41 100644 --- a/api/grpc/writer/stream_writer.go +++ b/api/grpc/resolver/stream_writer.go @@ -1,4 +1,4 @@ -package writer +package resolver import ( "github.com/awakari/client-sdk-go/model" diff --git a/api/grpc/writer/stream_writer_mock.go b/api/grpc/resolver/stream_writer_mock.go similarity index 97% rename from api/grpc/writer/stream_writer_mock.go rename to api/grpc/resolver/stream_writer_mock.go index c97460a..944ef6d 100644 --- a/api/grpc/writer/stream_writer_mock.go +++ b/api/grpc/resolver/stream_writer_mock.go @@ -1,4 +1,4 @@ -package writer +package resolver import ( "github.com/awakari/client-sdk-go/api/grpc/limits"