Refactor gRPC adapter to use connection pool and improve error handling in product retrieval
This commit is contained in:
@@ -24,6 +24,7 @@ const (
|
||||
|
||||
type GetListOfProductsRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
MarketplaceId int64 `protobuf:"varint,1,opt,name=marketplace_id,json=marketplaceId,proto3" json:"marketplace_id,omitempty"` // Unique identifier for the marketplace
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -58,6 +59,13 @@ func (*GetListOfProductsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ozon_products_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetListOfProductsRequest) GetMarketplaceId() int64 {
|
||||
if x != nil {
|
||||
return x.MarketplaceId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetListOfProductsResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
|
||||
@@ -346,8 +354,9 @@ var File_ozon_products_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ozon_products_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x13ozon/products.proto\x12\rozon.products\x1a\x1fgoogle/protobuf/timestamp.proto\"\x1a\n" +
|
||||
"\x18GetListOfProductsRequest\"O\n" +
|
||||
"\x13ozon/products.proto\x12\rozon.products\x1a\x1fgoogle/protobuf/timestamp.proto\"A\n" +
|
||||
"\x18GetListOfProductsRequest\x12%\n" +
|
||||
"\x0emarketplace_id\x18\x01 \x01(\x03R\rmarketplaceId\"O\n" +
|
||||
"\x19GetListOfProductsResponse\x122\n" +
|
||||
"\bproducts\x18\x01 \x03(\v2\x16.ozon.products.ProductR\bproducts\"\xb3\x03\n" +
|
||||
"\aProduct\x12\x0e\n" +
|
||||
|
||||
Submodule api/proto/v1 updated: b30d322774...c6df89a7a3
Reference in New Issue
Block a user