mirror of https://github.com/grpc/grpc.git
This reverts commit 362e0b8706
.
pull/29192/head
parent
882f64e376
commit
7ece810843
42 changed files with 217 additions and 2165 deletions
@ -1,172 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* src/proto/grpc/lookup/v1/rls_config.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include <stddef.h> |
||||
#include "upb/msg_internal.h" |
||||
#include "src/proto/grpc/lookup/v1/rls_config.upb.h" |
||||
#include "google/protobuf/duration.upb.h" |
||||
|
||||
#include "upb/port_def.inc" |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_NameMatcher__fields[3] = { |
||||
{1, UPB_SIZE(4, 8), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(12, 24), 0, 0, 9, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{3, UPB_SIZE(0, 0), 0, 0, 8, kUpb_FieldMode_Scalar | (upb_FieldRep_1Byte << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_NameMatcher_msginit = { |
||||
NULL, |
||||
&grpc_lookup_v1_NameMatcher__fields[0], |
||||
UPB_SIZE(16, 32), 3, upb_ExtMode_NonExtendable, 3, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Sub grpc_lookup_v1_GrpcKeyBuilder_submsgs[4] = { |
||||
{.submsg = &grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_msginit}, |
||||
{.submsg = &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit}, |
||||
{.submsg = &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit}, |
||||
{.submsg = &grpc_lookup_v1_NameMatcher_msginit}, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_GrpcKeyBuilder__fields[4] = { |
||||
{1, UPB_SIZE(8, 16), 0, 2, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(12, 24), 0, 3, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{3, UPB_SIZE(4, 8), 1, 1, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{4, UPB_SIZE(16, 32), 0, 0, 11, kUpb_FieldMode_Map | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_msginit = { |
||||
&grpc_lookup_v1_GrpcKeyBuilder_submsgs[0], |
||||
&grpc_lookup_v1_GrpcKeyBuilder__fields[0], |
||||
UPB_SIZE(24, 40), 4, upb_ExtMode_NonExtendable, 4, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_GrpcKeyBuilder_Name__fields[2] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(8, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_Name_msginit = { |
||||
NULL, |
||||
&grpc_lookup_v1_GrpcKeyBuilder_Name__fields[0], |
||||
UPB_SIZE(16, 32), 2, upb_ExtMode_NonExtendable, 2, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys__fields[3] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(8, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
{3, UPB_SIZE(16, 32), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit = { |
||||
NULL, |
||||
&grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys__fields[0], |
||||
UPB_SIZE(24, 48), 3, upb_ExtMode_NonExtendable, 3, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry__fields[2] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(8, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_msginit = { |
||||
NULL, |
||||
&grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry__fields[0], |
||||
UPB_SIZE(16, 32), 2, upb_ExtMode_NonExtendable, 2, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Sub grpc_lookup_v1_HttpKeyBuilder_submsgs[2] = { |
||||
{.submsg = &grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_msginit}, |
||||
{.submsg = &grpc_lookup_v1_NameMatcher_msginit}, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_HttpKeyBuilder__fields[5] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(4, 8), 0, 0, 9, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{3, UPB_SIZE(8, 16), 0, 1, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{4, UPB_SIZE(12, 24), 0, 1, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{5, UPB_SIZE(16, 32), 0, 0, 11, kUpb_FieldMode_Map | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_HttpKeyBuilder_msginit = { |
||||
&grpc_lookup_v1_HttpKeyBuilder_submsgs[0], |
||||
&grpc_lookup_v1_HttpKeyBuilder__fields[0], |
||||
UPB_SIZE(24, 40), 5, upb_ExtMode_NonExtendable, 5, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry__fields[2] = { |
||||
{1, UPB_SIZE(0, 0), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(8, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_msginit = { |
||||
NULL, |
||||
&grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry__fields[0], |
||||
UPB_SIZE(16, 32), 2, upb_ExtMode_NonExtendable, 2, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Sub grpc_lookup_v1_RouteLookupConfig_submsgs[3] = { |
||||
{.submsg = &google_protobuf_Duration_msginit}, |
||||
{.submsg = &grpc_lookup_v1_GrpcKeyBuilder_msginit}, |
||||
{.submsg = &grpc_lookup_v1_HttpKeyBuilder_msginit}, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_RouteLookupConfig__fields[9] = { |
||||
{1, UPB_SIZE(44, 72), 0, 2, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(48, 80), 0, 1, 11, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{3, UPB_SIZE(16, 16), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
{4, UPB_SIZE(32, 48), 1, 0, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{5, UPB_SIZE(36, 56), 2, 0, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{6, UPB_SIZE(40, 64), 3, 0, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{7, UPB_SIZE(8, 8), 0, 0, 3, kUpb_FieldMode_Scalar | (upb_FieldRep_8Byte << upb_FieldRep_Shift)}, |
||||
{8, UPB_SIZE(52, 88), 0, 0, 9, kUpb_FieldMode_Array | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
{9, UPB_SIZE(24, 32), 0, 0, 9, kUpb_FieldMode_Scalar | (upb_FieldRep_StringView << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_RouteLookupConfig_msginit = { |
||||
&grpc_lookup_v1_RouteLookupConfig_submsgs[0], |
||||
&grpc_lookup_v1_RouteLookupConfig__fields[0], |
||||
UPB_SIZE(56, 96), 9, upb_ExtMode_NonExtendable, 9, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Sub grpc_lookup_v1_RouteLookupClusterSpecifier_submsgs[1] = { |
||||
{.submsg = &grpc_lookup_v1_RouteLookupConfig_msginit}, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field grpc_lookup_v1_RouteLookupClusterSpecifier__fields[1] = { |
||||
{1, UPB_SIZE(4, 8), 1, 0, 11, kUpb_FieldMode_Scalar | (upb_FieldRep_Pointer << upb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable grpc_lookup_v1_RouteLookupClusterSpecifier_msginit = { |
||||
&grpc_lookup_v1_RouteLookupClusterSpecifier_submsgs[0], |
||||
&grpc_lookup_v1_RouteLookupClusterSpecifier__fields[0], |
||||
UPB_SIZE(8, 16), 1, upb_ExtMode_NonExtendable, 1, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable *messages_layout[9] = { |
||||
&grpc_lookup_v1_NameMatcher_msginit, |
||||
&grpc_lookup_v1_GrpcKeyBuilder_msginit, |
||||
&grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, |
||||
&grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, |
||||
&grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_msginit, |
||||
&grpc_lookup_v1_HttpKeyBuilder_msginit, |
||||
&grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_msginit, |
||||
&grpc_lookup_v1_RouteLookupConfig_msginit, |
||||
&grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, |
||||
}; |
||||
|
||||
const upb_MiniTable_File src_proto_grpc_lookup_v1_rls_config_proto_upb_file_layout = { |
||||
messages_layout, |
||||
NULL, |
||||
NULL, |
||||
9, |
||||
0, |
||||
0, |
||||
}; |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
@ -1,623 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* src/proto/grpc/lookup/v1/rls_config.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPB_H_ |
||||
#define SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPB_H_ |
||||
|
||||
#include "upb/msg_internal.h" |
||||
#include "upb/decode.h" |
||||
#include "upb/decode_fast.h" |
||||
#include "upb/encode.h" |
||||
|
||||
#include "upb/port_def.inc" |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
struct grpc_lookup_v1_NameMatcher; |
||||
struct grpc_lookup_v1_GrpcKeyBuilder; |
||||
struct grpc_lookup_v1_GrpcKeyBuilder_Name; |
||||
struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys; |
||||
struct grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry; |
||||
struct grpc_lookup_v1_HttpKeyBuilder; |
||||
struct grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry; |
||||
struct grpc_lookup_v1_RouteLookupConfig; |
||||
struct grpc_lookup_v1_RouteLookupClusterSpecifier; |
||||
typedef struct grpc_lookup_v1_NameMatcher grpc_lookup_v1_NameMatcher; |
||||
typedef struct grpc_lookup_v1_GrpcKeyBuilder grpc_lookup_v1_GrpcKeyBuilder; |
||||
typedef struct grpc_lookup_v1_GrpcKeyBuilder_Name grpc_lookup_v1_GrpcKeyBuilder_Name; |
||||
typedef struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys; |
||||
typedef struct grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry; |
||||
typedef struct grpc_lookup_v1_HttpKeyBuilder grpc_lookup_v1_HttpKeyBuilder; |
||||
typedef struct grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry; |
||||
typedef struct grpc_lookup_v1_RouteLookupConfig grpc_lookup_v1_RouteLookupConfig; |
||||
typedef struct grpc_lookup_v1_RouteLookupClusterSpecifier grpc_lookup_v1_RouteLookupClusterSpecifier; |
||||
extern const upb_MiniTable grpc_lookup_v1_NameMatcher_msginit; |
||||
extern const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_msginit; |
||||
extern const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_Name_msginit; |
||||
extern const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit; |
||||
extern const upb_MiniTable grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_msginit; |
||||
extern const upb_MiniTable grpc_lookup_v1_HttpKeyBuilder_msginit; |
||||
extern const upb_MiniTable grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_msginit; |
||||
extern const upb_MiniTable grpc_lookup_v1_RouteLookupConfig_msginit; |
||||
extern const upb_MiniTable grpc_lookup_v1_RouteLookupClusterSpecifier_msginit; |
||||
struct google_protobuf_Duration; |
||||
extern const upb_MiniTable google_protobuf_Duration_msginit; |
||||
|
||||
|
||||
|
||||
/* grpc.lookup.v1.NameMatcher */ |
||||
|
||||
UPB_INLINE grpc_lookup_v1_NameMatcher* grpc_lookup_v1_NameMatcher_new(upb_Arena* arena) { |
||||
return (grpc_lookup_v1_NameMatcher*)_upb_Message_New(&grpc_lookup_v1_NameMatcher_msginit, arena); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_NameMatcher* grpc_lookup_v1_NameMatcher_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
grpc_lookup_v1_NameMatcher* ret = grpc_lookup_v1_NameMatcher_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_NameMatcher_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_NameMatcher* grpc_lookup_v1_NameMatcher_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
grpc_lookup_v1_NameMatcher* ret = grpc_lookup_v1_NameMatcher_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_NameMatcher_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_NameMatcher_serialize(const grpc_lookup_v1_NameMatcher* msg, upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_NameMatcher_msginit, 0, arena, len); |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_NameMatcher_serialize_ex(const grpc_lookup_v1_NameMatcher* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_NameMatcher_msginit, options, arena, len); |
||||
} |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_NameMatcher_key(const grpc_lookup_v1_NameMatcher* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView); |
||||
} |
||||
UPB_INLINE upb_StringView const* grpc_lookup_v1_NameMatcher_names(const grpc_lookup_v1_NameMatcher *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } |
||||
UPB_INLINE bool grpc_lookup_v1_NameMatcher_required_match(const grpc_lookup_v1_NameMatcher* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); |
||||
} |
||||
|
||||
UPB_INLINE void grpc_lookup_v1_NameMatcher_set_key(grpc_lookup_v1_NameMatcher *msg, upb_StringView value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value; |
||||
} |
||||
UPB_INLINE upb_StringView* grpc_lookup_v1_NameMatcher_mutable_names(grpc_lookup_v1_NameMatcher *msg, size_t *len) { |
||||
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
||||
} |
||||
UPB_INLINE upb_StringView* grpc_lookup_v1_NameMatcher_resize_names(grpc_lookup_v1_NameMatcher *msg, size_t len, upb_Arena *arena) { |
||||
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(3, 4), arena); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_NameMatcher_add_names(grpc_lookup_v1_NameMatcher *msg, upb_StringView val, upb_Arena *arena) { |
||||
return _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(3, 4), &val, |
||||
arena); |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_NameMatcher_set_required_match(grpc_lookup_v1_NameMatcher *msg, bool value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; |
||||
} |
||||
|
||||
/* grpc.lookup.v1.GrpcKeyBuilder */ |
||||
|
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder* grpc_lookup_v1_GrpcKeyBuilder_new(upb_Arena* arena) { |
||||
return (grpc_lookup_v1_GrpcKeyBuilder*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_msginit, arena); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder* grpc_lookup_v1_GrpcKeyBuilder_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
grpc_lookup_v1_GrpcKeyBuilder* ret = grpc_lookup_v1_GrpcKeyBuilder_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder* grpc_lookup_v1_GrpcKeyBuilder_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
grpc_lookup_v1_GrpcKeyBuilder* ret = grpc_lookup_v1_GrpcKeyBuilder_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_serialize(const grpc_lookup_v1_GrpcKeyBuilder* msg, upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_msginit, 0, arena, len); |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_serialize_ex(const grpc_lookup_v1_GrpcKeyBuilder* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_msginit, options, arena, len); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_has_names(const grpc_lookup_v1_GrpcKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } |
||||
UPB_INLINE const grpc_lookup_v1_GrpcKeyBuilder_Name* const* grpc_lookup_v1_GrpcKeyBuilder_names(const grpc_lookup_v1_GrpcKeyBuilder *msg, size_t *len) { return (const grpc_lookup_v1_GrpcKeyBuilder_Name* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } |
||||
UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_has_headers(const grpc_lookup_v1_GrpcKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } |
||||
UPB_INLINE const grpc_lookup_v1_NameMatcher* const* grpc_lookup_v1_GrpcKeyBuilder_headers(const grpc_lookup_v1_GrpcKeyBuilder *msg, size_t *len) { return (const grpc_lookup_v1_NameMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } |
||||
UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_has_extra_keys(const grpc_lookup_v1_GrpcKeyBuilder *msg) { return _upb_hasbit(msg, 1); } |
||||
UPB_INLINE const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_extra_keys(const grpc_lookup_v1_GrpcKeyBuilder* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_has_constant_keys(const grpc_lookup_v1_GrpcKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } |
||||
UPB_INLINE size_t grpc_lookup_v1_GrpcKeyBuilder_constant_keys_size(const grpc_lookup_v1_GrpcKeyBuilder *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); } |
||||
UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_constant_keys_get(const grpc_lookup_v1_GrpcKeyBuilder *msg, upb_StringView key, upb_StringView *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, 0, val, 0); } |
||||
UPB_INLINE const grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry* grpc_lookup_v1_GrpcKeyBuilder_constant_keys_next(const grpc_lookup_v1_GrpcKeyBuilder *msg, size_t* iter) { return (const grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } |
||||
|
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name** grpc_lookup_v1_GrpcKeyBuilder_mutable_names(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t *len) { |
||||
return (grpc_lookup_v1_GrpcKeyBuilder_Name**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name** grpc_lookup_v1_GrpcKeyBuilder_resize_names(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t len, upb_Arena *arena) { |
||||
return (grpc_lookup_v1_GrpcKeyBuilder_Name**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena); |
||||
} |
||||
UPB_INLINE struct grpc_lookup_v1_GrpcKeyBuilder_Name* grpc_lookup_v1_GrpcKeyBuilder_add_names(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_Arena *arena) { |
||||
struct grpc_lookup_v1_GrpcKeyBuilder_Name* sub = (struct grpc_lookup_v1_GrpcKeyBuilder_Name*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, arena); |
||||
bool ok = _upb_Array_Append_accessor2( |
||||
msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena); |
||||
if (!ok) return NULL; |
||||
return sub; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_GrpcKeyBuilder_mutable_headers(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t *len) { |
||||
return (grpc_lookup_v1_NameMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_GrpcKeyBuilder_resize_headers(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t len, upb_Arena *arena) { |
||||
return (grpc_lookup_v1_NameMatcher**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); |
||||
} |
||||
UPB_INLINE struct grpc_lookup_v1_NameMatcher* grpc_lookup_v1_GrpcKeyBuilder_add_headers(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_Arena *arena) { |
||||
struct grpc_lookup_v1_NameMatcher* sub = (struct grpc_lookup_v1_NameMatcher*)_upb_Message_New(&grpc_lookup_v1_NameMatcher_msginit, arena); |
||||
bool ok = _upb_Array_Append_accessor2( |
||||
msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); |
||||
if (!ok) return NULL; |
||||
return sub; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_set_extra_keys(grpc_lookup_v1_GrpcKeyBuilder *msg, grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* value) { |
||||
_upb_sethas(msg, 1); |
||||
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*) = value; |
||||
} |
||||
UPB_INLINE struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_mutable_extra_keys(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_Arena *arena) { |
||||
struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* sub = (struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*)grpc_lookup_v1_GrpcKeyBuilder_extra_keys(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, arena); |
||||
if (!sub) return NULL; |
||||
grpc_lookup_v1_GrpcKeyBuilder_set_extra_keys(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_constant_keys_clear(grpc_lookup_v1_GrpcKeyBuilder *msg) { _upb_msg_map_clear(msg, UPB_SIZE(16, 32)); } |
||||
UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_constant_keys_set(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_StringView key, upb_StringView val, upb_Arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(16, 32), &key, 0, &val, 0, a); } |
||||
UPB_INLINE bool grpc_lookup_v1_GrpcKeyBuilder_constant_keys_delete(grpc_lookup_v1_GrpcKeyBuilder *msg, upb_StringView key) { return _upb_msg_map_delete(msg, UPB_SIZE(16, 32), &key, 0); } |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry* grpc_lookup_v1_GrpcKeyBuilder_constant_keys_nextmutable(grpc_lookup_v1_GrpcKeyBuilder *msg, size_t* iter) { return (grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } |
||||
|
||||
/* grpc.lookup.v1.GrpcKeyBuilder.Name */ |
||||
|
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name* grpc_lookup_v1_GrpcKeyBuilder_Name_new(upb_Arena* arena) { |
||||
return (grpc_lookup_v1_GrpcKeyBuilder_Name*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, arena); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name* grpc_lookup_v1_GrpcKeyBuilder_Name_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
grpc_lookup_v1_GrpcKeyBuilder_Name* ret = grpc_lookup_v1_GrpcKeyBuilder_Name_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_Name* grpc_lookup_v1_GrpcKeyBuilder_Name_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
grpc_lookup_v1_GrpcKeyBuilder_Name* ret = grpc_lookup_v1_GrpcKeyBuilder_Name_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_Name_serialize(const grpc_lookup_v1_GrpcKeyBuilder_Name* msg, upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, 0, arena, len); |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_Name_serialize_ex(const grpc_lookup_v1_GrpcKeyBuilder_Name* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_Name_msginit, options, arena, len); |
||||
} |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_Name_service(const grpc_lookup_v1_GrpcKeyBuilder_Name* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView); |
||||
} |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_Name_method(const grpc_lookup_v1_GrpcKeyBuilder_Name* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView); |
||||
} |
||||
|
||||
UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_Name_set_service(grpc_lookup_v1_GrpcKeyBuilder_Name *msg, upb_StringView value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_Name_set_method(grpc_lookup_v1_GrpcKeyBuilder_Name *msg, upb_StringView value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value; |
||||
} |
||||
|
||||
/* grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys */ |
||||
|
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_new(upb_Arena* arena) { |
||||
return (grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, arena); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* ret = grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* ret = grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_serialize(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg, upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, 0, arena, len); |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_serialize_ex(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_msginit, options, arena, len); |
||||
} |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_host(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView); |
||||
} |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_service(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView); |
||||
} |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_method(const grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView); |
||||
} |
||||
|
||||
UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_set_host(grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys *msg, upb_StringView value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_set_service(grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys *msg, upb_StringView value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_set_method(grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys *msg, upb_StringView value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = value; |
||||
} |
||||
|
||||
/* grpc.lookup.v1.GrpcKeyBuilder.ConstantKeysEntry */ |
||||
|
||||
UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_key(const grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry *msg) { |
||||
upb_StringView ret; |
||||
_upb_msg_map_key(msg, &ret, 0); |
||||
return ret; |
||||
} |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_value(const grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry *msg) { |
||||
upb_StringView ret; |
||||
_upb_msg_map_value(msg, &ret, 0); |
||||
return ret; |
||||
} |
||||
|
||||
UPB_INLINE void grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_set_value(grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry *msg, upb_StringView value) { |
||||
_upb_msg_map_set_value(msg, &value, 0); |
||||
} |
||||
|
||||
/* grpc.lookup.v1.HttpKeyBuilder */ |
||||
|
||||
UPB_INLINE grpc_lookup_v1_HttpKeyBuilder* grpc_lookup_v1_HttpKeyBuilder_new(upb_Arena* arena) { |
||||
return (grpc_lookup_v1_HttpKeyBuilder*)_upb_Message_New(&grpc_lookup_v1_HttpKeyBuilder_msginit, arena); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_HttpKeyBuilder* grpc_lookup_v1_HttpKeyBuilder_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
grpc_lookup_v1_HttpKeyBuilder* ret = grpc_lookup_v1_HttpKeyBuilder_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_HttpKeyBuilder_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_HttpKeyBuilder* grpc_lookup_v1_HttpKeyBuilder_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
grpc_lookup_v1_HttpKeyBuilder* ret = grpc_lookup_v1_HttpKeyBuilder_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_HttpKeyBuilder_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_HttpKeyBuilder_serialize(const grpc_lookup_v1_HttpKeyBuilder* msg, upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_HttpKeyBuilder_msginit, 0, arena, len); |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_HttpKeyBuilder_serialize_ex(const grpc_lookup_v1_HttpKeyBuilder* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_HttpKeyBuilder_msginit, options, arena, len); |
||||
} |
||||
UPB_INLINE upb_StringView const* grpc_lookup_v1_HttpKeyBuilder_host_patterns(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } |
||||
UPB_INLINE upb_StringView const* grpc_lookup_v1_HttpKeyBuilder_path_patterns(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } |
||||
UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_has_query_parameters(const grpc_lookup_v1_HttpKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } |
||||
UPB_INLINE const grpc_lookup_v1_NameMatcher* const* grpc_lookup_v1_HttpKeyBuilder_query_parameters(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { return (const grpc_lookup_v1_NameMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } |
||||
UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_has_headers(const grpc_lookup_v1_HttpKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } |
||||
UPB_INLINE const grpc_lookup_v1_NameMatcher* const* grpc_lookup_v1_HttpKeyBuilder_headers(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { return (const grpc_lookup_v1_NameMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } |
||||
UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_has_constant_keys(const grpc_lookup_v1_HttpKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } |
||||
UPB_INLINE size_t grpc_lookup_v1_HttpKeyBuilder_constant_keys_size(const grpc_lookup_v1_HttpKeyBuilder *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); } |
||||
UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_constant_keys_get(const grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView key, upb_StringView *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, 0, val, 0); } |
||||
UPB_INLINE const grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry* grpc_lookup_v1_HttpKeyBuilder_constant_keys_next(const grpc_lookup_v1_HttpKeyBuilder *msg, size_t* iter) { return (const grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } |
||||
|
||||
UPB_INLINE upb_StringView* grpc_lookup_v1_HttpKeyBuilder_mutable_host_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { |
||||
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); |
||||
} |
||||
UPB_INLINE upb_StringView* grpc_lookup_v1_HttpKeyBuilder_resize_host_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, size_t len, upb_Arena *arena) { |
||||
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_add_host_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView val, upb_Arena *arena) { |
||||
return _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val, |
||||
arena); |
||||
} |
||||
UPB_INLINE upb_StringView* grpc_lookup_v1_HttpKeyBuilder_mutable_path_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { |
||||
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); |
||||
} |
||||
UPB_INLINE upb_StringView* grpc_lookup_v1_HttpKeyBuilder_resize_path_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, size_t len, upb_Arena *arena) { |
||||
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(3, 4), arena); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_add_path_patterns(grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView val, upb_Arena *arena) { |
||||
return _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(3, 4), &val, |
||||
arena); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_HttpKeyBuilder_mutable_query_parameters(grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { |
||||
return (grpc_lookup_v1_NameMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_HttpKeyBuilder_resize_query_parameters(grpc_lookup_v1_HttpKeyBuilder *msg, size_t len, upb_Arena *arena) { |
||||
return (grpc_lookup_v1_NameMatcher**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena); |
||||
} |
||||
UPB_INLINE struct grpc_lookup_v1_NameMatcher* grpc_lookup_v1_HttpKeyBuilder_add_query_parameters(grpc_lookup_v1_HttpKeyBuilder *msg, upb_Arena *arena) { |
||||
struct grpc_lookup_v1_NameMatcher* sub = (struct grpc_lookup_v1_NameMatcher*)_upb_Message_New(&grpc_lookup_v1_NameMatcher_msginit, arena); |
||||
bool ok = _upb_Array_Append_accessor2( |
||||
msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena); |
||||
if (!ok) return NULL; |
||||
return sub; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_HttpKeyBuilder_mutable_headers(grpc_lookup_v1_HttpKeyBuilder *msg, size_t *len) { |
||||
return (grpc_lookup_v1_NameMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_NameMatcher** grpc_lookup_v1_HttpKeyBuilder_resize_headers(grpc_lookup_v1_HttpKeyBuilder *msg, size_t len, upb_Arena *arena) { |
||||
return (grpc_lookup_v1_NameMatcher**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena); |
||||
} |
||||
UPB_INLINE struct grpc_lookup_v1_NameMatcher* grpc_lookup_v1_HttpKeyBuilder_add_headers(grpc_lookup_v1_HttpKeyBuilder *msg, upb_Arena *arena) { |
||||
struct grpc_lookup_v1_NameMatcher* sub = (struct grpc_lookup_v1_NameMatcher*)_upb_Message_New(&grpc_lookup_v1_NameMatcher_msginit, arena); |
||||
bool ok = _upb_Array_Append_accessor2( |
||||
msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena); |
||||
if (!ok) return NULL; |
||||
return sub; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_HttpKeyBuilder_constant_keys_clear(grpc_lookup_v1_HttpKeyBuilder *msg) { _upb_msg_map_clear(msg, UPB_SIZE(16, 32)); } |
||||
UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_constant_keys_set(grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView key, upb_StringView val, upb_Arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(16, 32), &key, 0, &val, 0, a); } |
||||
UPB_INLINE bool grpc_lookup_v1_HttpKeyBuilder_constant_keys_delete(grpc_lookup_v1_HttpKeyBuilder *msg, upb_StringView key) { return _upb_msg_map_delete(msg, UPB_SIZE(16, 32), &key, 0); } |
||||
UPB_INLINE grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry* grpc_lookup_v1_HttpKeyBuilder_constant_keys_nextmutable(grpc_lookup_v1_HttpKeyBuilder *msg, size_t* iter) { return (grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } |
||||
|
||||
/* grpc.lookup.v1.HttpKeyBuilder.ConstantKeysEntry */ |
||||
|
||||
UPB_INLINE upb_StringView grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_key(const grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry *msg) { |
||||
upb_StringView ret; |
||||
_upb_msg_map_key(msg, &ret, 0); |
||||
return ret; |
||||
} |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_value(const grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry *msg) { |
||||
upb_StringView ret; |
||||
_upb_msg_map_value(msg, &ret, 0); |
||||
return ret; |
||||
} |
||||
|
||||
UPB_INLINE void grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_set_value(grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry *msg, upb_StringView value) { |
||||
_upb_msg_map_set_value(msg, &value, 0); |
||||
} |
||||
|
||||
/* grpc.lookup.v1.RouteLookupConfig */ |
||||
|
||||
UPB_INLINE grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupConfig_new(upb_Arena* arena) { |
||||
return (grpc_lookup_v1_RouteLookupConfig*)_upb_Message_New(&grpc_lookup_v1_RouteLookupConfig_msginit, arena); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupConfig_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
grpc_lookup_v1_RouteLookupConfig* ret = grpc_lookup_v1_RouteLookupConfig_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_RouteLookupConfig_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupConfig_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
grpc_lookup_v1_RouteLookupConfig* ret = grpc_lookup_v1_RouteLookupConfig_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_RouteLookupConfig_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_RouteLookupConfig_serialize(const grpc_lookup_v1_RouteLookupConfig* msg, upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_RouteLookupConfig_msginit, 0, arena, len); |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_RouteLookupConfig_serialize_ex(const grpc_lookup_v1_RouteLookupConfig* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_RouteLookupConfig_msginit, options, arena, len); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_http_keybuilders(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 72)); } |
||||
UPB_INLINE const grpc_lookup_v1_HttpKeyBuilder* const* grpc_lookup_v1_RouteLookupConfig_http_keybuilders(const grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { return (const grpc_lookup_v1_HttpKeyBuilder* const*)_upb_array_accessor(msg, UPB_SIZE(44, 72), len); } |
||||
UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_grpc_keybuilders(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 80)); } |
||||
UPB_INLINE const grpc_lookup_v1_GrpcKeyBuilder* const* grpc_lookup_v1_RouteLookupConfig_grpc_keybuilders(const grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { return (const grpc_lookup_v1_GrpcKeyBuilder* const*)_upb_array_accessor(msg, UPB_SIZE(48, 80), len); } |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_RouteLookupConfig_lookup_service(const grpc_lookup_v1_RouteLookupConfig* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_StringView); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_lookup_service_timeout(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_hasbit(msg, 1); } |
||||
UPB_INLINE const struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_lookup_service_timeout(const grpc_lookup_v1_RouteLookupConfig* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(32, 48), const struct google_protobuf_Duration*); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_max_age(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_hasbit(msg, 2); } |
||||
UPB_INLINE const struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_max_age(const grpc_lookup_v1_RouteLookupConfig* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), const struct google_protobuf_Duration*); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_has_stale_age(const grpc_lookup_v1_RouteLookupConfig *msg) { return _upb_hasbit(msg, 3); } |
||||
UPB_INLINE const struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_stale_age(const grpc_lookup_v1_RouteLookupConfig* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(40, 64), const struct google_protobuf_Duration*); |
||||
} |
||||
UPB_INLINE int64_t grpc_lookup_v1_RouteLookupConfig_cache_size_bytes(const grpc_lookup_v1_RouteLookupConfig* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); |
||||
} |
||||
UPB_INLINE upb_StringView const* grpc_lookup_v1_RouteLookupConfig_valid_targets(const grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(52, 88), len); } |
||||
UPB_INLINE upb_StringView grpc_lookup_v1_RouteLookupConfig_default_target(const grpc_lookup_v1_RouteLookupConfig* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), upb_StringView); |
||||
} |
||||
|
||||
UPB_INLINE grpc_lookup_v1_HttpKeyBuilder** grpc_lookup_v1_RouteLookupConfig_mutable_http_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { |
||||
return (grpc_lookup_v1_HttpKeyBuilder**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 72), len); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_HttpKeyBuilder** grpc_lookup_v1_RouteLookupConfig_resize_http_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, size_t len, upb_Arena *arena) { |
||||
return (grpc_lookup_v1_HttpKeyBuilder**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(44, 72), len, UPB_SIZE(2, 3), arena); |
||||
} |
||||
UPB_INLINE struct grpc_lookup_v1_HttpKeyBuilder* grpc_lookup_v1_RouteLookupConfig_add_http_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { |
||||
struct grpc_lookup_v1_HttpKeyBuilder* sub = (struct grpc_lookup_v1_HttpKeyBuilder*)_upb_Message_New(&grpc_lookup_v1_HttpKeyBuilder_msginit, arena); |
||||
bool ok = _upb_Array_Append_accessor2( |
||||
msg, UPB_SIZE(44, 72), UPB_SIZE(2, 3), &sub, arena); |
||||
if (!ok) return NULL; |
||||
return sub; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder** grpc_lookup_v1_RouteLookupConfig_mutable_grpc_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { |
||||
return (grpc_lookup_v1_GrpcKeyBuilder**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 80), len); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_GrpcKeyBuilder** grpc_lookup_v1_RouteLookupConfig_resize_grpc_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, size_t len, upb_Arena *arena) { |
||||
return (grpc_lookup_v1_GrpcKeyBuilder**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(48, 80), len, UPB_SIZE(2, 3), arena); |
||||
} |
||||
UPB_INLINE struct grpc_lookup_v1_GrpcKeyBuilder* grpc_lookup_v1_RouteLookupConfig_add_grpc_keybuilders(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { |
||||
struct grpc_lookup_v1_GrpcKeyBuilder* sub = (struct grpc_lookup_v1_GrpcKeyBuilder*)_upb_Message_New(&grpc_lookup_v1_GrpcKeyBuilder_msginit, arena); |
||||
bool ok = _upb_Array_Append_accessor2( |
||||
msg, UPB_SIZE(48, 80), UPB_SIZE(2, 3), &sub, arena); |
||||
if (!ok) return NULL; |
||||
return sub; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_lookup_service(grpc_lookup_v1_RouteLookupConfig *msg, upb_StringView value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_StringView) = value; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_lookup_service_timeout(grpc_lookup_v1_RouteLookupConfig *msg, struct google_protobuf_Duration* value) { |
||||
_upb_sethas(msg, 1); |
||||
*UPB_PTR_AT(msg, UPB_SIZE(32, 48), struct google_protobuf_Duration*) = value; |
||||
} |
||||
UPB_INLINE struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_mutable_lookup_service_timeout(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { |
||||
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lookup_v1_RouteLookupConfig_lookup_service_timeout(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msginit, arena); |
||||
if (!sub) return NULL; |
||||
grpc_lookup_v1_RouteLookupConfig_set_lookup_service_timeout(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_max_age(grpc_lookup_v1_RouteLookupConfig *msg, struct google_protobuf_Duration* value) { |
||||
_upb_sethas(msg, 2); |
||||
*UPB_PTR_AT(msg, UPB_SIZE(36, 56), struct google_protobuf_Duration*) = value; |
||||
} |
||||
UPB_INLINE struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_mutable_max_age(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { |
||||
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lookup_v1_RouteLookupConfig_max_age(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msginit, arena); |
||||
if (!sub) return NULL; |
||||
grpc_lookup_v1_RouteLookupConfig_set_max_age(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_stale_age(grpc_lookup_v1_RouteLookupConfig *msg, struct google_protobuf_Duration* value) { |
||||
_upb_sethas(msg, 3); |
||||
*UPB_PTR_AT(msg, UPB_SIZE(40, 64), struct google_protobuf_Duration*) = value; |
||||
} |
||||
UPB_INLINE struct google_protobuf_Duration* grpc_lookup_v1_RouteLookupConfig_mutable_stale_age(grpc_lookup_v1_RouteLookupConfig *msg, upb_Arena *arena) { |
||||
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lookup_v1_RouteLookupConfig_stale_age(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct google_protobuf_Duration*)_upb_Message_New(&google_protobuf_Duration_msginit, arena); |
||||
if (!sub) return NULL; |
||||
grpc_lookup_v1_RouteLookupConfig_set_stale_age(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_cache_size_bytes(grpc_lookup_v1_RouteLookupConfig *msg, int64_t value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value; |
||||
} |
||||
UPB_INLINE upb_StringView* grpc_lookup_v1_RouteLookupConfig_mutable_valid_targets(grpc_lookup_v1_RouteLookupConfig *msg, size_t *len) { |
||||
return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 88), len); |
||||
} |
||||
UPB_INLINE upb_StringView* grpc_lookup_v1_RouteLookupConfig_resize_valid_targets(grpc_lookup_v1_RouteLookupConfig *msg, size_t len, upb_Arena *arena) { |
||||
return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(52, 88), len, UPB_SIZE(3, 4), arena); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_RouteLookupConfig_add_valid_targets(grpc_lookup_v1_RouteLookupConfig *msg, upb_StringView val, upb_Arena *arena) { |
||||
return _upb_Array_Append_accessor2(msg, UPB_SIZE(52, 88), UPB_SIZE(3, 4), &val, |
||||
arena); |
||||
} |
||||
UPB_INLINE void grpc_lookup_v1_RouteLookupConfig_set_default_target(grpc_lookup_v1_RouteLookupConfig *msg, upb_StringView value) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(24, 32), upb_StringView) = value; |
||||
} |
||||
|
||||
/* grpc.lookup.v1.RouteLookupClusterSpecifier */ |
||||
|
||||
UPB_INLINE grpc_lookup_v1_RouteLookupClusterSpecifier* grpc_lookup_v1_RouteLookupClusterSpecifier_new(upb_Arena* arena) { |
||||
return (grpc_lookup_v1_RouteLookupClusterSpecifier*)_upb_Message_New(&grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, arena); |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_RouteLookupClusterSpecifier* grpc_lookup_v1_RouteLookupClusterSpecifier_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
grpc_lookup_v1_RouteLookupClusterSpecifier* ret = grpc_lookup_v1_RouteLookupClusterSpecifier_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE grpc_lookup_v1_RouteLookupClusterSpecifier* grpc_lookup_v1_RouteLookupClusterSpecifier_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
grpc_lookup_v1_RouteLookupClusterSpecifier* ret = grpc_lookup_v1_RouteLookupClusterSpecifier_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_RouteLookupClusterSpecifier_serialize(const grpc_lookup_v1_RouteLookupClusterSpecifier* msg, upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, 0, arena, len); |
||||
} |
||||
UPB_INLINE char* grpc_lookup_v1_RouteLookupClusterSpecifier_serialize_ex(const grpc_lookup_v1_RouteLookupClusterSpecifier* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
return upb_Encode(msg, &grpc_lookup_v1_RouteLookupClusterSpecifier_msginit, options, arena, len); |
||||
} |
||||
UPB_INLINE bool grpc_lookup_v1_RouteLookupClusterSpecifier_has_route_lookup_config(const grpc_lookup_v1_RouteLookupClusterSpecifier *msg) { return _upb_hasbit(msg, 1); } |
||||
UPB_INLINE const grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupClusterSpecifier_route_lookup_config(const grpc_lookup_v1_RouteLookupClusterSpecifier* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const grpc_lookup_v1_RouteLookupConfig*); |
||||
} |
||||
|
||||
UPB_INLINE void grpc_lookup_v1_RouteLookupClusterSpecifier_set_route_lookup_config(grpc_lookup_v1_RouteLookupClusterSpecifier *msg, grpc_lookup_v1_RouteLookupConfig* value) { |
||||
_upb_sethas(msg, 1); |
||||
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), grpc_lookup_v1_RouteLookupConfig*) = value; |
||||
} |
||||
UPB_INLINE struct grpc_lookup_v1_RouteLookupConfig* grpc_lookup_v1_RouteLookupClusterSpecifier_mutable_route_lookup_config(grpc_lookup_v1_RouteLookupClusterSpecifier *msg, upb_Arena *arena) { |
||||
struct grpc_lookup_v1_RouteLookupConfig* sub = (struct grpc_lookup_v1_RouteLookupConfig*)grpc_lookup_v1_RouteLookupClusterSpecifier_route_lookup_config(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct grpc_lookup_v1_RouteLookupConfig*)_upb_Message_New(&grpc_lookup_v1_RouteLookupConfig_msginit, arena); |
||||
if (!sub) return NULL; |
||||
grpc_lookup_v1_RouteLookupClusterSpecifier_set_route_lookup_config(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
extern const upb_MiniTable_File src_proto_grpc_lookup_v1_rls_config_proto_upb_file_layout; |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPB_H_ */ |
@ -1,99 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* src/proto/grpc/lookup/v1/rls_config.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include "upb/def.h" |
||||
#include "src/proto/grpc/lookup/v1/rls_config.upbdefs.h" |
||||
#include "src/proto/grpc/lookup/v1/rls_config.upb.h" |
||||
|
||||
extern _upb_DefPool_Init google_protobuf_duration_proto_upbdefinit; |
||||
static const char descriptor[1816] = {'\n', ')', 's', 'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'l', 'o', 'o', 'k', 'u', 'p', '/', 'v',
|
||||
'1', '/', 'r', 'l', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\016', 'g', 'r', 'p', 'c', '.',
|
||||
'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u',
|
||||
'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\"', '\\', '\n', '\013', 'N', 'a', 'm', 'e', 'M',
|
||||
'a', 't', 'c', 'h', 'e', 'r', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022',
|
||||
'\024', '\n', '\005', 'n', 'a', 'm', 'e', 's', '\030', '\002', ' ', '\003', '(', '\t', 'R', '\005', 'n', 'a', 'm', 'e', 's', '\022', '%', '\n', '\016',
|
||||
'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '_', 'm', 'a', 't', 'c', 'h', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\r', 'r', 'e', 'q',
|
||||
'u', 'i', 'r', 'e', 'd', 'M', 'a', 't', 'c', 'h', '\"', '\360', '\003', '\n', '\016', 'G', 'r', 'p', 'c', 'K', 'e', 'y', 'B', 'u', 'i',
|
||||
'l', 'd', 'e', 'r', '\022', '9', '\n', '\005', 'n', 'a', 'm', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '#', '.', 'g', 'r', 'p',
|
||||
'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'G', 'r', 'p', 'c', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e',
|
||||
'r', '.', 'N', 'a', 'm', 'e', 'R', '\005', 'n', 'a', 'm', 'e', 's', '\022', 'G', '\n', '\n', 'e', 'x', 't', 'r', 'a', '_', 'k', 'e',
|
||||
'y', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '(', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1',
|
||||
'.', 'G', 'r', 'p', 'c', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'E', 'x', 't', 'r', 'a', 'K', 'e', 'y', 's',
|
||||
'R', '\t', 'e', 'x', 't', 'r', 'a', 'K', 'e', 'y', 's', '\022', '5', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\002', ' ',
|
||||
'\003', '(', '\013', '2', '\033', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'N', 'a', 'm', 'e',
|
||||
'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\022', 'U', '\n', '\r', 'c', 'o', 'n', 's', 't',
|
||||
'a', 'n', 't', '_', 'k', 'e', 'y', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '0', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o',
|
||||
'k', 'u', 'p', '.', 'v', '1', '.', 'G', 'r', 'p', 'c', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'C', 'o', 'n',
|
||||
's', 't', 'a', 'n', 't', 'K', 'e', 'y', 's', 'E', 'n', 't', 'r', 'y', 'R', '\014', 'c', 'o', 'n', 's', 't', 'a', 'n', 't', 'K',
|
||||
'e', 'y', 's', '\032', '8', '\n', '\004', 'N', 'a', 'm', 'e', '\022', '\030', '\n', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\001', ' ',
|
||||
'\001', '(', '\t', 'R', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\022', '\026', '\n', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\030', '\002', ' ',
|
||||
'\001', '(', '\t', 'R', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\032', 'Q', '\n', '\t', 'E', 'x', 't', 'r', 'a', 'K', 'e', 'y', 's', '\022',
|
||||
'\022', '\n', '\004', 'h', 'o', 's', 't', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'h', 'o', 's', 't', '\022', '\030', '\n', '\007', 's', 'e',
|
||||
'r', 'v', 'i', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\022', '\026', '\n', '\006', 'm',
|
||||
'e', 't', 'h', 'o', 'd', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\032', '?', '\n', '\021', 'C', 'o',
|
||||
'n', 's', 't', 'a', 'n', 't', 'K', 'e', 'y', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ',
|
||||
'\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\005',
|
||||
'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', '\361', '\002', '\n', '\016', 'H', 't', 't', 'p', 'K', 'e', 'y', 'B', 'u', 'i', 'l',
|
||||
'd', 'e', 'r', '\022', '#', '\n', '\r', 'h', 'o', 's', 't', '_', 'p', 'a', 't', 't', 'e', 'r', 'n', 's', '\030', '\001', ' ', '\003', '(',
|
||||
'\t', 'R', '\014', 'h', 'o', 's', 't', 'P', 'a', 't', 't', 'e', 'r', 'n', 's', '\022', '#', '\n', '\r', 'p', 'a', 't', 'h', '_', 'p',
|
||||
'a', 't', 't', 'e', 'r', 'n', 's', '\030', '\002', ' ', '\003', '(', '\t', 'R', '\014', 'p', 'a', 't', 'h', 'P', 'a', 't', 't', 'e', 'r',
|
||||
'n', 's', '\022', 'F', '\n', '\020', 'q', 'u', 'e', 'r', 'y', '_', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\030', '\003', ' ',
|
||||
'\003', '(', '\013', '2', '\033', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'N', 'a', 'm', 'e',
|
||||
'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\017', 'q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\022',
|
||||
'5', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '\033', '.', 'g', 'r', 'p', 'c', '.', 'l',
|
||||
'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'N', 'a', 'm', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\007', 'h', 'e', 'a',
|
||||
'd', 'e', 'r', 's', '\022', 'U', '\n', '\r', 'c', 'o', 'n', 's', 't', 'a', 'n', 't', '_', 'k', 'e', 'y', 's', '\030', '\005', ' ', '\003',
|
||||
'(', '\013', '2', '0', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'H', 't', 't', 'p', 'K',
|
||||
'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'C', 'o', 'n', 's', 't', 'a', 'n', 't', 'K', 'e', 'y', 's', 'E', 'n', 't',
|
||||
'r', 'y', 'R', '\014', 'c', 'o', 'n', 's', 't', 'a', 'n', 't', 'K', 'e', 'y', 's', '\032', '?', '\n', '\021', 'C', 'o', 'n', 's', 't',
|
||||
'a', 'n', 't', 'K', 'e', 'y', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t',
|
||||
'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\005', 'v', 'a', 'l',
|
||||
'u', 'e', ':', '\002', '8', '\001', '\"', '\246', '\004', '\n', '\021', 'R', 'o', 'u', 't', 'e', 'L', 'o', 'o', 'k', 'u', 'p', 'C', 'o', 'n',
|
||||
'f', 'i', 'g', '\022', 'I', '\n', '\020', 'h', 't', 't', 'p', '_', 'k', 'e', 'y', 'b', 'u', 'i', 'l', 'd', 'e', 'r', 's', '\030', '\001',
|
||||
' ', '\003', '(', '\013', '2', '\036', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'H', 't', 't',
|
||||
'p', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', 'R', '\017', 'h', 't', 't', 'p', 'K', 'e', 'y', 'b', 'u', 'i', 'l', 'd',
|
||||
'e', 'r', 's', '\022', 'I', '\n', '\020', 'g', 'r', 'p', 'c', '_', 'k', 'e', 'y', 'b', 'u', 'i', 'l', 'd', 'e', 'r', 's', '\030', '\002',
|
||||
' ', '\003', '(', '\013', '2', '\036', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'G', 'r', 'p',
|
||||
'c', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', 'R', '\017', 'g', 'r', 'p', 'c', 'K', 'e', 'y', 'b', 'u', 'i', 'l', 'd',
|
||||
'e', 'r', 's', '\022', '%', '\n', '\016', 'l', 'o', 'o', 'k', 'u', 'p', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\003', ' ', '\001',
|
||||
'(', '\t', 'R', '\r', 'l', 'o', 'o', 'k', 'u', 'p', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'O', '\n', '\026', 'l', 'o', 'o', 'k',
|
||||
'u', 'p', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\004', ' ', '\001', '(', '\013', '2',
|
||||
'\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o',
|
||||
'n', 'R', '\024', 'l', 'o', 'o', 'k', 'u', 'p', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '2',
|
||||
'\n', '\007', 'm', 'a', 'x', '_', 'a', 'g', 'e', '\030', '\005', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
|
||||
'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\006', 'm', 'a', 'x', 'A', 'g', 'e',
|
||||
'\022', '6', '\n', '\t', 's', 't', 'a', 'l', 'e', '_', 'a', 'g', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o',
|
||||
'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\010', 's', 't',
|
||||
'a', 'l', 'e', 'A', 'g', 'e', '\022', '(', '\n', '\020', 'c', 'a', 'c', 'h', 'e', '_', 's', 'i', 'z', 'e', '_', 'b', 'y', 't', 'e',
|
||||
's', '\030', '\007', ' ', '\001', '(', '\003', 'R', '\016', 'c', 'a', 'c', 'h', 'e', 'S', 'i', 'z', 'e', 'B', 'y', 't', 'e', 's', '\022', '#',
|
||||
'\n', '\r', 'v', 'a', 'l', 'i', 'd', '_', 't', 'a', 'r', 'g', 'e', 't', 's', '\030', '\010', ' ', '\003', '(', '\t', 'R', '\014', 'v', 'a',
|
||||
'l', 'i', 'd', 'T', 'a', 'r', 'g', 'e', 't', 's', '\022', '%', '\n', '\016', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 't', 'a', 'r',
|
||||
'g', 'e', 't', '\030', '\t', ' ', '\001', '(', '\t', 'R', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'T', 'a', 'r', 'g', 'e', 't', 'J',
|
||||
'\004', '\010', '\n', '\020', '\013', 'R', '\033', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'p', 'r', 'o', 'c', 'e', 's', 's', 'i', 'n', 'g',
|
||||
'_', 's', 't', 'r', 'a', 't', 'e', 'g', 'y', '\"', 'p', '\n', '\033', 'R', 'o', 'u', 't', 'e', 'L', 'o', 'o', 'k', 'u', 'p', 'C',
|
||||
'l', 'u', 's', 't', 'e', 'r', 'S', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', 'Q', '\n', '\023', 'r', 'o', 'u', 't', 'e', '_',
|
||||
'l', 'o', 'o', 'k', 'u', 'p', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '!', '.', 'g', 'r', 'p',
|
||||
'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', '.', 'R', 'o', 'u', 't', 'e', 'L', 'o', 'o', 'k', 'u', 'p', 'C', 'o',
|
||||
'n', 'f', 'i', 'g', 'R', '\021', 'r', 'o', 'u', 't', 'e', 'L', 'o', 'o', 'k', 'u', 'p', 'C', 'o', 'n', 'f', 'i', 'g', 'B', 'S',
|
||||
'\n', '\021', 'i', 'o', '.', 'g', 'r', 'p', 'c', '.', 'l', 'o', 'o', 'k', 'u', 'p', '.', 'v', '1', 'B', '\016', 'R', 'l', 's', 'C',
|
||||
'o', 'n', 'f', 'i', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', ',', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a',
|
||||
'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'r', 'p', 'c', '/', 'l', 'o', 'o', 'k', 'u', 'p', '/', 'g', 'r', 'p', 'c', '_', 'l',
|
||||
'o', 'o', 'k', 'u', 'p', '_', 'v', '1', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
|
||||
}; |
||||
|
||||
static _upb_DefPool_Init *deps[2] = { |
||||
&google_protobuf_duration_proto_upbdefinit, |
||||
NULL |
||||
}; |
||||
|
||||
_upb_DefPool_Init src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit = { |
||||
deps, |
||||
&src_proto_grpc_lookup_v1_rls_config_proto_upb_file_layout, |
||||
"src/proto/grpc/lookup/v1/rls_config.proto", |
||||
UPB_STRINGVIEW_INIT(descriptor, 1816) |
||||
}; |
@ -1,75 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* src/proto/grpc/lookup/v1/rls_config.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPBDEFS_H_ |
||||
#define SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPBDEFS_H_ |
||||
|
||||
#include "upb/def.h" |
||||
#include "upb/port_def.inc" |
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
#include "upb/def.h" |
||||
|
||||
#include "upb/port_def.inc" |
||||
|
||||
extern _upb_DefPool_Init src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit; |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_NameMatcher_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.NameMatcher"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_GrpcKeyBuilder_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.GrpcKeyBuilder"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_GrpcKeyBuilder_Name_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.GrpcKeyBuilder.Name"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_GrpcKeyBuilder_ExtraKeys_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.GrpcKeyBuilder.ExtraKeys"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_GrpcKeyBuilder_ConstantKeysEntry_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.GrpcKeyBuilder.ConstantKeysEntry"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_HttpKeyBuilder_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.HttpKeyBuilder"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_HttpKeyBuilder_ConstantKeysEntry_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.HttpKeyBuilder.ConstantKeysEntry"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_RouteLookupConfig_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.RouteLookupConfig"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *grpc_lookup_v1_RouteLookupClusterSpecifier_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &src_proto_grpc_lookup_v1_rls_config_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "grpc.lookup.v1.RouteLookupClusterSpecifier"); |
||||
} |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* SRC_PROTO_GRPC_LOOKUP_V1_RLS_CONFIG_PROTO_UPBDEFS_H_ */ |
@ -1,144 +0,0 @@ |
||||
//
|
||||
// Copyright 2022 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#include <grpc/support/port_platform.h> |
||||
|
||||
#include "src/core/ext/xds/xds_cluster_specifier_plugin.h" |
||||
|
||||
#include "absl/strings/str_format.h" |
||||
#include "envoy/extensions/filters/http/router/v3/router.upb.h" |
||||
#include "envoy/extensions/filters/http/router/v3/router.upbdefs.h" |
||||
#include "google/protobuf/duration.upb.h" |
||||
#include "upb/json_encode.h" |
||||
|
||||
#include "src/core/ext/filters/client_channel/lb_policy_registry.h" |
||||
#include "src/core/ext/xds/upb_utils.h" |
||||
#include "src/proto/grpc/lookup/v1/rls_config.upb.h" |
||||
#include "src/proto/grpc/lookup/v1/rls_config.upbdefs.h" |
||||
|
||||
namespace grpc_core { |
||||
|
||||
const char* kXdsRouteLookupClusterSpecifierPluginConfigName = |
||||
"grpc.lookup.v1.RouteLookupClusterSpecifier"; |
||||
|
||||
void XdsRouteLookupClusterSpecifierPlugin::PopulateSymtab( |
||||
upb_DefPool* symtab) const { |
||||
grpc_lookup_v1_RouteLookupConfig_getmsgdef(symtab); |
||||
} |
||||
|
||||
absl::StatusOr<Json> |
||||
XdsRouteLookupClusterSpecifierPlugin::GenerateLoadBalancingPolicyConfig( |
||||
upb_StringView serialized_plugin_config, upb_Arena* arena, |
||||
upb_DefPool* symtab) const { |
||||
const auto* specifier = grpc_lookup_v1_RouteLookupClusterSpecifier_parse( |
||||
serialized_plugin_config.data, serialized_plugin_config.size, arena); |
||||
if (specifier == nullptr) { |
||||
return absl::InvalidArgumentError("Could not parse plugin config"); |
||||
} |
||||
const auto* plugin_config = |
||||
grpc_lookup_v1_RouteLookupClusterSpecifier_route_lookup_config(specifier); |
||||
if (plugin_config == nullptr) { |
||||
return absl::InvalidArgumentError( |
||||
"Could not get route lookup config from route lookup cluster " |
||||
"specifier"); |
||||
} |
||||
upb::Status status; |
||||
const upb_MessageDef* msg_type = |
||||
grpc_lookup_v1_RouteLookupConfig_getmsgdef(symtab); |
||||
size_t json_size = upb_JsonEncode(plugin_config, msg_type, symtab, 0, nullptr, |
||||
0, status.ptr()); |
||||
if (json_size == static_cast<size_t>(-1)) { |
||||
return absl::InvalidArgumentError( |
||||
absl::StrCat("failed to dump proto to JSON: ", |
||||
upb_Status_ErrorMessage(status.ptr()))); |
||||
} |
||||
void* buf = upb_Arena_Malloc(arena, json_size + 1); |
||||
upb_JsonEncode(plugin_config, msg_type, symtab, 0, |
||||
reinterpret_cast<char*>(buf), json_size + 1, status.ptr()); |
||||
Json::Object rls_policy; |
||||
grpc_error_handle error = GRPC_ERROR_NONE; |
||||
rls_policy["routeLookupConfig"] = |
||||
Json::Parse(reinterpret_cast<char*>(buf), &error); |
||||
GPR_ASSERT(error == GRPC_ERROR_NONE); |
||||
Json::Object cds_policy; |
||||
cds_policy["cds_experimental"] = Json::Object(); |
||||
Json::Array child_policy; |
||||
child_policy.emplace_back(std::move(cds_policy)); |
||||
rls_policy["childPolicy"] = std::move(child_policy); |
||||
rls_policy["childPolicyConfigTargetFieldName"] = "cluster"; |
||||
Json::Object policy; |
||||
policy["rls_experimental"] = std::move(rls_policy); |
||||
Json::Array policies; |
||||
policies.emplace_back(std::move(policy)); |
||||
return Json(policies); |
||||
} |
||||
|
||||
namespace { |
||||
|
||||
using PluginRegistryMap = |
||||
std::map<absl::string_view, std::unique_ptr<XdsClusterSpecifierPluginImpl>>; |
||||
|
||||
PluginRegistryMap* g_plugin_registry = nullptr; |
||||
|
||||
} // namespace
|
||||
|
||||
void XdsClusterSpecifierPluginRegistry::PopulateSymtab(upb_DefPool* symtab) { |
||||
for (const auto& p : *g_plugin_registry) { |
||||
p.second->PopulateSymtab(symtab); |
||||
} |
||||
} |
||||
|
||||
void XdsClusterSpecifierPluginRegistry::RegisterPlugin( |
||||
std::unique_ptr<XdsClusterSpecifierPluginImpl> plugin, |
||||
absl::string_view config_proto_type_name) { |
||||
(*g_plugin_registry)[config_proto_type_name] = std::move(plugin); |
||||
} |
||||
|
||||
absl::StatusOr<std::string> |
||||
XdsClusterSpecifierPluginRegistry::GenerateLoadBalancingPolicyConfig( |
||||
absl::string_view proto_type_name, upb_StringView serialized_plugin_config, |
||||
upb_Arena* arena, upb_DefPool* symtab) { |
||||
auto it = g_plugin_registry->find(proto_type_name); |
||||
if (it == g_plugin_registry->end()) { |
||||
return absl::InvalidArgumentError( |
||||
"Unable to locate the cluster specifier plugin in the registry"); |
||||
} |
||||
auto lb_policy_config = it->second->GenerateLoadBalancingPolicyConfig( |
||||
serialized_plugin_config, arena, symtab); |
||||
if (!lb_policy_config.ok()) return lb_policy_config.status(); |
||||
grpc_error_handle parse_error = GRPC_ERROR_NONE; |
||||
LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(*lb_policy_config, |
||||
&parse_error); |
||||
if (parse_error != GRPC_ERROR_NONE) { |
||||
absl::Status status = absl::InvalidArgumentError(absl::StrCat( |
||||
proto_type_name, |
||||
" ClusterSpecifierPlugin returned invalid LB policy config: ", |
||||
grpc_error_std_string(parse_error))); |
||||
GRPC_ERROR_UNREF(parse_error); |
||||
return status; |
||||
} |
||||
return lb_policy_config->Dump(); |
||||
} |
||||
|
||||
void XdsClusterSpecifierPluginRegistry::Init() { |
||||
g_plugin_registry = new PluginRegistryMap; |
||||
RegisterPlugin(absl::make_unique<XdsRouteLookupClusterSpecifierPlugin>(), |
||||
kXdsRouteLookupClusterSpecifierPluginConfigName); |
||||
} |
||||
|
||||
void XdsClusterSpecifierPluginRegistry::Shutdown() { delete g_plugin_registry; } |
||||
|
||||
} // namespace grpc_core
|
@ -1,81 +0,0 @@ |
||||
//
|
||||
// Copyright 2022 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#ifndef GRPC_CORE_EXT_XDS_XDS_CLUSTER_SPECIFIER_PLUGIN_H |
||||
#define GRPC_CORE_EXT_XDS_XDS_CLUSTER_SPECIFIER_PLUGIN_H |
||||
|
||||
#include <grpc/support/port_platform.h> |
||||
|
||||
#include <memory> |
||||
#include <set> |
||||
#include <string> |
||||
|
||||
#include "absl/status/statusor.h" |
||||
#include "absl/strings/str_cat.h" |
||||
#include "absl/strings/string_view.h" |
||||
#include "google/protobuf/any.upb.h" |
||||
#include "upb/def.h" |
||||
|
||||
#include <grpc/grpc.h> |
||||
|
||||
#include "src/core/lib/channel/channel_stack.h" |
||||
#include "src/core/lib/json/json.h" |
||||
|
||||
namespace grpc_core { |
||||
|
||||
class XdsClusterSpecifierPluginImpl { |
||||
public: |
||||
virtual ~XdsClusterSpecifierPluginImpl() = default; |
||||
|
||||
// Loads the proto message into the upb symtab.
|
||||
virtual void PopulateSymtab(upb_DefPool* symtab) const = 0; |
||||
|
||||
// Returns the LB policy config in JSON form.
|
||||
virtual absl::StatusOr<Json> GenerateLoadBalancingPolicyConfig( |
||||
upb_StringView serialized_plugin_config, upb_Arena* arena, |
||||
upb_DefPool* symtab) const = 0; |
||||
}; |
||||
|
||||
class XdsRouteLookupClusterSpecifierPlugin |
||||
: public XdsClusterSpecifierPluginImpl { |
||||
void PopulateSymtab(upb_DefPool* symtab) const override; |
||||
|
||||
absl::StatusOr<Json> GenerateLoadBalancingPolicyConfig( |
||||
upb_StringView serialized_plugin_config, upb_Arena* arena, |
||||
upb_DefPool* symtab) const override; |
||||
}; |
||||
|
||||
class XdsClusterSpecifierPluginRegistry { |
||||
public: |
||||
static void RegisterPlugin( |
||||
std::unique_ptr<XdsClusterSpecifierPluginImpl> plugin, |
||||
absl::string_view config_proto_type_name); |
||||
|
||||
static void PopulateSymtab(upb_DefPool* symtab); |
||||
|
||||
static absl::StatusOr<std::string> GenerateLoadBalancingPolicyConfig( |
||||
absl::string_view proto_type_name, |
||||
upb_StringView serialized_plugin_config, upb_Arena* arena, |
||||
upb_DefPool* symtab); |
||||
|
||||
// Global init and shutdown.
|
||||
static void Init(); |
||||
static void Shutdown(); |
||||
}; |
||||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_CORE_EXT_XDS_XDS_CLUSTER_SPECIFIER_PLUGIN_H
|
@ -1,103 +0,0 @@ |
||||
//
|
||||
// Copyright 2020 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#include "test/cpp/end2end/rls_server.h" |
||||
|
||||
#include <gmock/gmock.h> |
||||
|
||||
#include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" |
||||
#include "src/proto/grpc/lookup/v1/rls.pb.h" |
||||
#include "test/core/util/test_config.h" |
||||
|
||||
using ::grpc::lookup::v1::RouteLookupRequest; |
||||
using ::grpc::lookup::v1::RouteLookupResponse; |
||||
|
||||
namespace grpc { |
||||
namespace testing { |
||||
|
||||
::grpc::Status RlsServiceImpl::RouteLookup(grpc::ServerContext* context, |
||||
const RouteLookupRequest* request, |
||||
RouteLookupResponse* response) { |
||||
gpr_log(GPR_INFO, "RLS: Received request: %s", |
||||
request->DebugString().c_str()); |
||||
if (context_proc_ != nullptr) { |
||||
context_proc_(context); |
||||
} |
||||
IncreaseRequestCount(); |
||||
EXPECT_EQ(request->target_type(), "grpc"); |
||||
// See if we have a configured response for this request.
|
||||
ResponseData res; |
||||
{ |
||||
grpc::internal::MutexLock lock(&mu_); |
||||
auto it = responses_.find(*request); |
||||
if (it == responses_.end()) { |
||||
gpr_log(GPR_INFO, "RLS: no matching request, returning INTERNAL"); |
||||
unmatched_requests_.push_back(*request); |
||||
return Status(StatusCode::INTERNAL, "no response entry"); |
||||
} |
||||
res = it->second; |
||||
} |
||||
// Configured response found, so use it.
|
||||
if (res.response_delay > grpc_core::Duration::Zero()) { |
||||
gpr_sleep_until( |
||||
grpc_timeout_milliseconds_to_deadline(res.response_delay.millis())); |
||||
} |
||||
IncreaseResponseCount(); |
||||
*response = res.response; |
||||
gpr_log(GPR_INFO, "RLS: returning configured response: %s", |
||||
response->DebugString().c_str()); |
||||
return Status::OK; |
||||
} |
||||
|
||||
void RlsServiceImpl::SetResponse(RouteLookupRequest request, |
||||
RouteLookupResponse response, |
||||
grpc_core::Duration response_delay) { |
||||
grpc::internal::MutexLock lock(&mu_); |
||||
responses_[std::move(request)] = {std::move(response), response_delay}; |
||||
} |
||||
|
||||
void RlsServiceImpl::RemoveResponse(const RouteLookupRequest& request) { |
||||
grpc::internal::MutexLock lock(&mu_); |
||||
responses_.erase(request); |
||||
} |
||||
|
||||
std::vector<RouteLookupRequest> RlsServiceImpl::GetUnmatchedRequests() { |
||||
grpc::internal::MutexLock lock(&mu_); |
||||
return std::move(unmatched_requests_); |
||||
} |
||||
|
||||
grpc::lookup::v1::RouteLookupRequest BuildRlsRequest( |
||||
std::map<std::string, std::string> key, |
||||
grpc::lookup::v1::RouteLookupRequest::Reason reason, |
||||
const char* stale_header_data) { |
||||
grpc::lookup::v1::RouteLookupRequest request; |
||||
request.set_target_type("grpc"); |
||||
request.mutable_key_map()->insert(key.begin(), key.end()); |
||||
request.set_reason(reason); |
||||
request.set_stale_header_data(stale_header_data); |
||||
return request; |
||||
} |
||||
|
||||
grpc::lookup::v1::RouteLookupResponse BuildRlsResponse( |
||||
std::vector<std::string> targets, const char* header_data) { |
||||
grpc::lookup::v1::RouteLookupResponse response; |
||||
response.mutable_targets()->Add(targets.begin(), targets.end()); |
||||
response.set_header_data(header_data); |
||||
return response; |
||||
} |
||||
|
||||
} // namespace testing
|
||||
} // namespace grpc
|
@ -1,94 +0,0 @@ |
||||
//
|
||||
// Copyright 2020 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#include "absl/types/optional.h" |
||||
|
||||
#include "src/core/lib/gprpp/time.h" |
||||
#include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" |
||||
#include "src/proto/grpc/lookup/v1/rls.pb.h" |
||||
#include "test/cpp/end2end/counted_service.h" |
||||
|
||||
namespace grpc { |
||||
namespace testing { |
||||
|
||||
using RlsService = |
||||
CountedService<grpc::lookup::v1::RouteLookupService::Service>; |
||||
|
||||
class RlsServiceImpl : public RlsService { |
||||
public: |
||||
using ContextProcessingFunc = std::function<void(grpc::ServerContext*)>; |
||||
|
||||
explicit RlsServiceImpl(ContextProcessingFunc context_proc = nullptr) |
||||
: context_proc_(std::move(context_proc)) {} |
||||
|
||||
grpc::Status RouteLookup( |
||||
grpc::ServerContext* context, |
||||
const grpc::lookup::v1::RouteLookupRequest* request, |
||||
grpc::lookup::v1::RouteLookupResponse* response) override; |
||||
|
||||
void Start() {} |
||||
|
||||
void Shutdown() {} |
||||
|
||||
void SetResponse(grpc::lookup::v1::RouteLookupRequest request, |
||||
grpc::lookup::v1::RouteLookupResponse response, |
||||
grpc_core::Duration response_delay = grpc_core::Duration()); |
||||
|
||||
void RemoveResponse(const grpc::lookup::v1::RouteLookupRequest& request); |
||||
|
||||
std::vector<grpc::lookup::v1::RouteLookupRequest> GetUnmatchedRequests(); |
||||
|
||||
private: |
||||
// Sorting thunk for RouteLookupRequest.
|
||||
struct RlsRequestLessThan { |
||||
bool operator()(const grpc::lookup::v1::RouteLookupRequest& req1, |
||||
const grpc::lookup::v1::RouteLookupRequest& req2) const { |
||||
std::map<absl::string_view, absl::string_view> key_map1( |
||||
req1.key_map().begin(), req1.key_map().end()); |
||||
std::map<absl::string_view, absl::string_view> key_map2( |
||||
req2.key_map().begin(), req2.key_map().end()); |
||||
if (key_map1 < key_map2) return true; |
||||
if (req1.reason() < req2.reason()) return true; |
||||
if (req1.stale_header_data() < req2.stale_header_data()) return true; |
||||
return false; |
||||
} |
||||
}; |
||||
|
||||
struct ResponseData { |
||||
grpc::lookup::v1::RouteLookupResponse response; |
||||
grpc_core::Duration response_delay; |
||||
}; |
||||
|
||||
ContextProcessingFunc context_proc_; |
||||
grpc::internal::Mutex mu_; |
||||
std::map<grpc::lookup::v1::RouteLookupRequest, ResponseData, |
||||
RlsRequestLessThan> |
||||
responses_ ABSL_GUARDED_BY(&mu_); |
||||
std::vector<grpc::lookup::v1::RouteLookupRequest> unmatched_requests_ |
||||
ABSL_GUARDED_BY(&mu_); |
||||
}; |
||||
|
||||
grpc::lookup::v1::RouteLookupRequest BuildRlsRequest( |
||||
std::map<std::string, std::string> key, |
||||
grpc::lookup::v1::RouteLookupRequest::Reason reason = |
||||
grpc::lookup::v1::RouteLookupRequest::REASON_MISS, |
||||
const char* stale_header_data = ""); |
||||
|
||||
grpc::lookup::v1::RouteLookupResponse BuildRlsResponse( |
||||
std::vector<std::string> targets, const char* header_data = ""); |
||||
|
||||
} // namespace testing
|
||||
} // namespace grpc
|
Loading…
Reference in new issue