-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nanopb upgrade 0.4.9. cluster script specified. weight. max_fails fai…
…ls_timeout
- Loading branch information
zhwaaaaaa
committed
Dec 14, 2024
1 parent
db782d9
commit 4542817
Showing
21 changed files
with
2,668 additions
and
1,511 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
mkdir -p objs | ||
cd objs | ||
curl -sSL https://jpa.kapsi.fi/nanopb/download/nanopb-0.4.9-linux-x86.tar.gz -o nanopb.tar.gz | ||
|
||
tar zxvf nanopb.tar.gz | ||
mv nanopb-0.4.9-linux-x86 nanopb | ||
|
||
python3 nanopb/generator/nanopb_generator.py backup.proto nacos_grpc_service.proto -I ../modules/nacos |
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,34 +1,18 @@ | ||
/* Automatically generated nanopb constant definitions */ | ||
/* Generated by nanopb-0.3.9.8 at Fri Aug 9 21:47:15 2024. */ | ||
/* Generated by nanopb-0.4.9 */ | ||
|
||
#include "backup.pb.h" | ||
|
||
/* @@protoc_insertion_point(includes) */ | ||
#if PB_PROTO_HEADER_VERSION != 30 | ||
#if PB_PROTO_HEADER_VERSION != 40 | ||
#error Regenerate this file with the current version of nanopb generator. | ||
#endif | ||
|
||
PB_BIND(Config, Config, AUTO) | ||
|
||
|
||
PB_BIND(Instance, Instance, AUTO) | ||
|
||
const pb_field_t Config_fields[4] = { | ||
PB_FIELD( 1, UINT64 , SINGULAR, STATIC , FIRST, Config, version, version, 0), | ||
PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, Config, content, version, 0), | ||
PB_FIELD( 3, STRING , SINGULAR, CALLBACK, OTHER, Config, md5, content, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
const pb_field_t Instance_fields[4] = { | ||
PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, Instance, host, host, 0), | ||
PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, Instance, port, host, 0), | ||
PB_FIELD( 3, INT32 , SINGULAR, STATIC , OTHER, Instance, weight, port, 0), | ||
PB_LAST_FIELD | ||
}; | ||
PB_BIND(Service, Service, AUTO) | ||
|
||
const pb_field_t Service_fields[3] = { | ||
PB_FIELD( 1, UINT64 , SINGULAR, STATIC , FIRST, Service, version, version, 0), | ||
PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, Service, instances, version, &Instance_fields), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
|
||
/* @@protoc_insertion_point(eof) */ |
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 |
---|---|---|
@@ -1,73 +1,21 @@ | ||
/* Automatically generated nanopb constant definitions */ | ||
/* Generated by nanopb-0.3.9.10 at Mon Jun 3 14:49:02 2024. */ | ||
/* Generated by nanopb-0.4.9 */ | ||
|
||
#include "nacos_grpc_service.pb.h" | ||
|
||
/* @@protoc_insertion_point(includes) */ | ||
#if PB_PROTO_HEADER_VERSION != 30 | ||
#if PB_PROTO_HEADER_VERSION != 40 | ||
#error Regenerate this file with the current version of nanopb generator. | ||
#endif | ||
|
||
/** | ||
* #define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ | ||
PB_ ## rules ## _ ## allocation(tag, message, field, \ | ||
PB_DATAOFFSET_ ## placement(message, field, prevfield), \ | ||
PB_LTYPE_MAP_ ## type, ptr) | ||
*/ | ||
|
||
|
||
const pb_field_t google_protobuf_Any_fields[3] = { | ||
PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_protobuf_Any, type_url, type_url, 0), | ||
PB_FIELD( 2, BYTES , SINGULAR, CALLBACK, OTHER, google_protobuf_Any, value, type_url, 0), | ||
PB_LAST_FIELD | ||
}; | ||
PB_BIND(Any, Any, AUTO) | ||
|
||
|
||
const pb_field_t Metadata_HeadersEntry_fields[3] = { | ||
PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, Metadata_HeadersEntry, key, key, 0), | ||
PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, Metadata_HeadersEntry, value, key, 0), | ||
PB_LAST_FIELD | ||
}; | ||
PB_BIND(Metadata, Metadata, AUTO) | ||
|
||
const pb_field_t Metadata_fields[4] = { | ||
PB_FIELD( 3, STRING , SINGULAR, CALLBACK, FIRST, Metadata, type, type, 0), | ||
// PB_SINGULAR_CALLBACK(3, Metadata, type, PB_DATAOFFSET_FIRST(Metadata, type, type), PB_LTYPE_MAP_STRING, 0), | ||
PB_FIELD( 7, MESSAGE , REPEATED, CALLBACK, OTHER, Metadata, headers, type, &Metadata_HeadersEntry_fields), | ||
PB_FIELD( 8, STRING , SINGULAR, CALLBACK, OTHER, Metadata, clientIp, headers, 0), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
PB_BIND(Metadata_HeadersEntry, Metadata_HeadersEntry, AUTO) | ||
|
||
const pb_field_t Payload_fields[3] = { | ||
PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , FIRST, Payload, metadata, metadata, &Metadata_fields), | ||
// PB_SINGULAR_STATIC(2, Payload,metadata, PB_DATAOFFSET_FIRST(Payload, metadata, metadata), PB_LTYPE_MAP_MESSAGE, &Metadata_fields), | ||
PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, Payload, body, metadata, &google_protobuf_Any_fields), | ||
PB_LAST_FIELD | ||
}; | ||
|
||
PB_BIND(Payload, Payload, AUTO) | ||
|
||
/* Check that field information fits in pb_field_t */ | ||
#if !defined(PB_FIELD_32BIT) | ||
/* If you get an error here, it means that you need to define PB_FIELD_32BIT | ||
* compile-time option. You can do that in pb.h or on compiler command line. | ||
* | ||
* The reason you need to do this is that some of your messages contain tag | ||
* numbers or field sizes that are larger than what can fit in 8 or 16 bit | ||
* field descriptors. | ||
*/ | ||
PB_STATIC_ASSERT((pb_membersize(Payload, metadata) < 65536 && pb_membersize(Payload, body) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_Metadata_Metadata_HeadersEntry_Payload) | ||
#endif | ||
|
||
#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) | ||
/* If you get an error here, it means that you need to define PB_FIELD_16BIT | ||
* compile-time option. You can do that in pb.h or on compiler command line. | ||
* | ||
* The reason you need to do this is that some of your messages contain tag | ||
* numbers or field sizes that are larger than what can fit in the default | ||
* 8 bit descriptors. | ||
*/ | ||
PB_STATIC_ASSERT((pb_membersize(Payload, metadata) < 256 && pb_membersize(Payload, body) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_Metadata_Metadata_HeadersEntry_Payload) | ||
#endif | ||
|
||
|
||
/* @@protoc_insertion_point(eof) */ |
Oops, something went wrong.