mirror of https://github.com/grpc/grpc.git
This reverts commit 7f054ffab0
.
pull/31823/head
parent
18029913b9
commit
0fd59754b1
42 changed files with 61 additions and 1668 deletions
@ -1,62 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include <stddef.h> |
||||
#include "upb/msg_internal.h" |
||||
#include "envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h" |
||||
#include "envoy/config/core/v3/extension.upb.h" |
||||
#include "udpa/annotations/status.upb.h" |
||||
#include "validate/validate.upb.h" |
||||
|
||||
#include "upb/port_def.inc" |
||||
|
||||
static const upb_MiniTable_Sub envoy_extensions_filters_http_stateful_session_v3_StatefulSession_submsgs[1] = { |
||||
{.submsg = &envoy_config_core_v3_TypedExtensionConfig_msginit}, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field envoy_extensions_filters_http_stateful_session_v3_StatefulSession__fields[1] = { |
||||
{1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), 0, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit = { |
||||
&envoy_extensions_filters_http_stateful_session_v3_StatefulSession_submsgs[0], |
||||
&envoy_extensions_filters_http_stateful_session_v3_StatefulSession__fields[0], |
||||
UPB_SIZE(8, 16), 1, kUpb_ExtMode_NonExtendable, 1, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Sub envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_submsgs[1] = { |
||||
{.submsg = &envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit}, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute__fields[2] = { |
||||
{1, UPB_SIZE(4, 8), UPB_SIZE(-1, -1), kUpb_NoSub, 8, kUpb_FieldMode_Scalar | (kUpb_FieldRep_1Byte << kUpb_FieldRep_Shift)}, |
||||
{2, UPB_SIZE(4, 8), UPB_SIZE(-1, -1), 0, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_msginit = { |
||||
&envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_submsgs[0], |
||||
&envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute__fields[0], |
||||
UPB_SIZE(8, 16), 2, kUpb_ExtMode_NonExtendable, 2, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable *messages_layout[2] = { |
||||
&envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit, |
||||
&envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_msginit, |
||||
}; |
||||
|
||||
const upb_MiniTable_File envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_upb_file_layout = { |
||||
messages_layout, |
||||
NULL, |
||||
NULL, |
||||
2, |
||||
0, |
||||
0, |
||||
}; |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
@ -1,179 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef ENVOY_EXTENSIONS_FILTERS_HTTP_STATEFUL_SESSION_V3_STATEFUL_SESSION_PROTO_UPB_H_ |
||||
#define ENVOY_EXTENSIONS_FILTERS_HTTP_STATEFUL_SESSION_V3_STATEFUL_SESSION_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 envoy_extensions_filters_http_stateful_session_v3_StatefulSession; |
||||
struct envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute; |
||||
typedef struct envoy_extensions_filters_http_stateful_session_v3_StatefulSession envoy_extensions_filters_http_stateful_session_v3_StatefulSession; |
||||
typedef struct envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute; |
||||
extern const upb_MiniTable envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit; |
||||
extern const upb_MiniTable envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_msginit; |
||||
struct envoy_config_core_v3_TypedExtensionConfig; |
||||
extern const upb_MiniTable envoy_config_core_v3_TypedExtensionConfig_msginit; |
||||
|
||||
|
||||
|
||||
/* envoy.extensions.filters.http.stateful_session.v3.StatefulSession */ |
||||
|
||||
UPB_INLINE envoy_extensions_filters_http_stateful_session_v3_StatefulSession* envoy_extensions_filters_http_stateful_session_v3_StatefulSession_new(upb_Arena* arena) { |
||||
return (envoy_extensions_filters_http_stateful_session_v3_StatefulSession*)_upb_Message_New(&envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_extensions_filters_http_stateful_session_v3_StatefulSession* envoy_extensions_filters_http_stateful_session_v3_StatefulSession_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSession* ret = envoy_extensions_filters_http_stateful_session_v3_StatefulSession_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE envoy_extensions_filters_http_stateful_session_v3_StatefulSession* envoy_extensions_filters_http_stateful_session_v3_StatefulSession_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSession* ret = envoy_extensions_filters_http_stateful_session_v3_StatefulSession_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* envoy_extensions_filters_http_stateful_session_v3_StatefulSession_serialize(const envoy_extensions_filters_http_stateful_session_v3_StatefulSession* msg, upb_Arena* arena, size_t* len) { |
||||
char* ptr; |
||||
(void)upb_Encode(msg, &envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit, 0, arena, &ptr, len); |
||||
return ptr; |
||||
} |
||||
UPB_INLINE char* envoy_extensions_filters_http_stateful_session_v3_StatefulSession_serialize_ex(const envoy_extensions_filters_http_stateful_session_v3_StatefulSession* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
char* ptr; |
||||
(void)upb_Encode(msg, &envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit, options, arena, &ptr, len); |
||||
return ptr; |
||||
} |
||||
UPB_INLINE bool envoy_extensions_filters_http_stateful_session_v3_StatefulSession_has_session_state(const envoy_extensions_filters_http_stateful_session_v3_StatefulSession* msg) { |
||||
return _upb_hasbit(msg, 1); |
||||
} |
||||
UPB_INLINE void envoy_extensions_filters_http_stateful_session_v3_StatefulSession_clear_session_state(const envoy_extensions_filters_http_stateful_session_v3_StatefulSession* msg) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL; |
||||
} |
||||
UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_extensions_filters_http_stateful_session_v3_StatefulSession_session_state(const envoy_extensions_filters_http_stateful_session_v3_StatefulSession* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_TypedExtensionConfig*); |
||||
} |
||||
|
||||
UPB_INLINE void envoy_extensions_filters_http_stateful_session_v3_StatefulSession_set_session_state(envoy_extensions_filters_http_stateful_session_v3_StatefulSession *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) { |
||||
_upb_sethas(msg, 1); |
||||
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_TypedExtensionConfig*) = value; |
||||
} |
||||
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_extensions_filters_http_stateful_session_v3_StatefulSession_mutable_session_state(envoy_extensions_filters_http_stateful_session_v3_StatefulSession* msg, upb_Arena* arena) { |
||||
struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)envoy_extensions_filters_http_stateful_session_v3_StatefulSession_session_state(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_Message_New(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSession_set_session_state(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
/* envoy.extensions.filters.http.stateful_session.v3.StatefulSessionPerRoute */ |
||||
|
||||
UPB_INLINE envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_new(upb_Arena* arena) { |
||||
return (envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute*)_upb_Message_New(&envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* ret = envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* ret = envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_serialize(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg, upb_Arena* arena, size_t* len) { |
||||
char* ptr; |
||||
(void)upb_Encode(msg, &envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_msginit, 0, arena, &ptr, len); |
||||
return ptr; |
||||
} |
||||
UPB_INLINE char* envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_serialize_ex(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
char* ptr; |
||||
(void)upb_Encode(msg, &envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_msginit, options, arena, &ptr, len); |
||||
return ptr; |
||||
} |
||||
typedef enum { |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_disabled = 1, |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_stateful_session = 2, |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_NOT_SET = 0 |
||||
} envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_oneofcases; |
||||
UPB_INLINE envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_oneofcases envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_case(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg) { |
||||
return (envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); |
||||
} |
||||
UPB_INLINE bool envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_has_disabled(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg) { |
||||
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 1; |
||||
} |
||||
UPB_INLINE void envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_clear_disabled(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg) { |
||||
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_NOT_SET); |
||||
} |
||||
UPB_INLINE bool envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_disabled(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg) { |
||||
return UPB_READ_ONEOF(msg, bool, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 1, false); |
||||
} |
||||
UPB_INLINE bool envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_has_stateful_session(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg) { |
||||
return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2; |
||||
} |
||||
UPB_INLINE void envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_clear_stateful_session(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg) { |
||||
UPB_WRITE_ONEOF(msg, envoy_extensions_filters_http_stateful_session_v3_StatefulSession*, UPB_SIZE(4, 8), 0, UPB_SIZE(0, 0), envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_override_NOT_SET); |
||||
} |
||||
UPB_INLINE const envoy_extensions_filters_http_stateful_session_v3_StatefulSession* envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_stateful_session(const envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg) { |
||||
return UPB_READ_ONEOF(msg, const envoy_extensions_filters_http_stateful_session_v3_StatefulSession*, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 2, NULL); |
||||
} |
||||
|
||||
UPB_INLINE void envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_set_disabled(envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute *msg, bool value) { |
||||
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 1); |
||||
} |
||||
UPB_INLINE void envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_set_stateful_session(envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute *msg, envoy_extensions_filters_http_stateful_session_v3_StatefulSession* value) { |
||||
UPB_WRITE_ONEOF(msg, envoy_extensions_filters_http_stateful_session_v3_StatefulSession*, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 2); |
||||
} |
||||
UPB_INLINE struct envoy_extensions_filters_http_stateful_session_v3_StatefulSession* envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_mutable_stateful_session(envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute* msg, upb_Arena* arena) { |
||||
struct envoy_extensions_filters_http_stateful_session_v3_StatefulSession* sub = (struct envoy_extensions_filters_http_stateful_session_v3_StatefulSession*)envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_stateful_session(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_extensions_filters_http_stateful_session_v3_StatefulSession*)_upb_Message_New(&envoy_extensions_filters_http_stateful_session_v3_StatefulSession_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_set_stateful_session(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
extern const upb_MiniTable_File envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_upb_file_layout; |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* ENVOY_EXTENSIONS_FILTERS_HTTP_STATEFUL_SESSION_V3_STATEFUL_SESSION_PROTO_UPB_H_ */ |
@ -1,46 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/extensions/http/stateful_session/cookie/v3/cookie.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include <stddef.h> |
||||
#include "upb/msg_internal.h" |
||||
#include "envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.h" |
||||
#include "envoy/type/http/v3/cookie.upb.h" |
||||
#include "udpa/annotations/status.upb.h" |
||||
#include "validate/validate.upb.h" |
||||
|
||||
#include "upb/port_def.inc" |
||||
|
||||
static const upb_MiniTable_Sub envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_submsgs[1] = { |
||||
{.submsg = &envoy_type_http_v3_Cookie_msginit}, |
||||
}; |
||||
|
||||
static const upb_MiniTable_Field envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState__fields[1] = { |
||||
{1, UPB_SIZE(4, 8), UPB_SIZE(1, 1), 0, 11, kUpb_FieldMode_Scalar | (kUpb_FieldRep_Pointer << kUpb_FieldRep_Shift)}, |
||||
}; |
||||
|
||||
const upb_MiniTable envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_msginit = { |
||||
&envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_submsgs[0], |
||||
&envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState__fields[0], |
||||
UPB_SIZE(8, 16), 1, kUpb_ExtMode_NonExtendable, 1, 255, 0, |
||||
}; |
||||
|
||||
static const upb_MiniTable *messages_layout[1] = { |
||||
&envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_msginit, |
||||
}; |
||||
|
||||
const upb_MiniTable_File envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_upb_file_layout = { |
||||
messages_layout, |
||||
NULL, |
||||
NULL, |
||||
1, |
||||
0, |
||||
0, |
||||
}; |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
@ -1,98 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/extensions/http/stateful_session/cookie/v3/cookie.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef ENVOY_EXTENSIONS_HTTP_STATEFUL_SESSION_COOKIE_V3_COOKIE_PROTO_UPB_H_ |
||||
#define ENVOY_EXTENSIONS_HTTP_STATEFUL_SESSION_COOKIE_V3_COOKIE_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 envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState; |
||||
typedef struct envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState; |
||||
extern const upb_MiniTable envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_msginit; |
||||
struct envoy_type_http_v3_Cookie; |
||||
extern const upb_MiniTable envoy_type_http_v3_Cookie_msginit; |
||||
|
||||
|
||||
|
||||
/* envoy.extensions.http.stateful_session.cookie.v3.CookieBasedSessionState */ |
||||
|
||||
UPB_INLINE envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_new(upb_Arena* arena) { |
||||
return (envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState*)_upb_Message_New(&envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_msginit, arena); |
||||
} |
||||
UPB_INLINE envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_parse(const char* buf, size_t size, upb_Arena* arena) { |
||||
envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* ret = envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_parse_ex(const char* buf, size_t size, |
||||
const upb_ExtensionRegistry* extreg, |
||||
int options, upb_Arena* arena) { |
||||
envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* ret = envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_new(arena); |
||||
if (!ret) return NULL; |
||||
if (upb_Decode(buf, size, ret, &envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_msginit, extreg, options, arena) != |
||||
kUpb_DecodeStatus_Ok) { |
||||
return NULL; |
||||
} |
||||
return ret; |
||||
} |
||||
UPB_INLINE char* envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_serialize(const envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* msg, upb_Arena* arena, size_t* len) { |
||||
char* ptr; |
||||
(void)upb_Encode(msg, &envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_msginit, 0, arena, &ptr, len); |
||||
return ptr; |
||||
} |
||||
UPB_INLINE char* envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_serialize_ex(const envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* msg, int options, |
||||
upb_Arena* arena, size_t* len) { |
||||
char* ptr; |
||||
(void)upb_Encode(msg, &envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_msginit, options, arena, &ptr, len); |
||||
return ptr; |
||||
} |
||||
UPB_INLINE bool envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_has_cookie(const envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* msg) { |
||||
return _upb_hasbit(msg, 1); |
||||
} |
||||
UPB_INLINE void envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_clear_cookie(const envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* msg) { |
||||
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL; |
||||
} |
||||
UPB_INLINE const struct envoy_type_http_v3_Cookie* envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_cookie(const envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* msg) { |
||||
return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_http_v3_Cookie*); |
||||
} |
||||
|
||||
UPB_INLINE void envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_set_cookie(envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState *msg, struct envoy_type_http_v3_Cookie* value) { |
||||
_upb_sethas(msg, 1); |
||||
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_http_v3_Cookie*) = value; |
||||
} |
||||
UPB_INLINE struct envoy_type_http_v3_Cookie* envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_mutable_cookie(envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState* msg, upb_Arena* arena) { |
||||
struct envoy_type_http_v3_Cookie* sub = (struct envoy_type_http_v3_Cookie*)envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_cookie(msg); |
||||
if (sub == NULL) { |
||||
sub = (struct envoy_type_http_v3_Cookie*)_upb_Message_New(&envoy_type_http_v3_Cookie_msginit, arena); |
||||
if (!sub) return NULL; |
||||
envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_set_cookie(msg, sub); |
||||
} |
||||
return sub; |
||||
} |
||||
|
||||
extern const upb_MiniTable_File envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_upb_file_layout; |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* ENVOY_EXTENSIONS_HTTP_STATEFUL_SESSION_COOKIE_V3_COOKIE_PROTO_UPB_H_ */ |
@ -1,60 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include "upb/def.h" |
||||
#include "envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.h" |
||||
#include "envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h" |
||||
|
||||
extern _upb_DefPool_Init envoy_config_core_v3_extension_proto_upbdefinit; |
||||
extern _upb_DefPool_Init udpa_annotations_status_proto_upbdefinit; |
||||
extern _upb_DefPool_Init validate_validate_proto_upbdefinit; |
||||
static const char descriptor[733] = {'\n', 'H', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 'f', 'i', 'l', 't', 'e', 'r',
|
||||
's', '/', 'h', 't', 't', 'p', '/', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '/', 'v',
|
||||
'3', '/', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022',
|
||||
'1', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's',
|
||||
'.', 'h', 't', 't', 'p', '.', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '.', 'v', '3',
|
||||
'\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'x',
|
||||
't', 'e', 'n', 's', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't',
|
||||
'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i',
|
||||
'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 'b', '\n', '\017', 'S', 't',
|
||||
'a', 't', 'e', 'f', 'u', 'l', 'S', 'e', 's', 's', 'i', 'o', 'n', '\022', 'O', '\n', '\r', 's', 'e', 's', 's', 'i', 'o', 'n', '_',
|
||||
's', 't', 'a', 't', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
|
||||
'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C',
|
||||
'o', 'n', 'f', 'i', 'g', 'R', '\014', 's', 'e', 's', 's', 'i', 'o', 'n', 'S', 't', 'a', 't', 'e', '\"', '\302', '\001', '\n', '\027', 'S',
|
||||
't', 'a', 't', 'e', 'f', 'u', 'l', 'S', 'e', 's', 's', 'i', 'o', 'n', 'P', 'e', 'r', 'R', 'o', 'u', 't', 'e', '\022', '%', '\n',
|
||||
'\010', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', 'B', '\007', '\372', 'B', '\004', 'j', '\002', '\010', '\001', 'H',
|
||||
'\000', 'R', '\010', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'd', '\022', 'o', '\n', '\020', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's',
|
||||
'e', 's', 's', 'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\013', '2', 'B', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e',
|
||||
'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'h', 't', 't', 'p', '.', 's', 't', 'a', 't', 'e',
|
||||
'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '.', 'v', '3', '.', 'S', 't', 'a', 't', 'e', 'f', 'u', 'l', 'S', 'e',
|
||||
's', 's', 'i', 'o', 'n', 'H', '\000', 'R', '\017', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', 'S', 'e', 's', 's', 'i', 'o', 'n', 'B',
|
||||
'\017', '\n', '\010', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '\022', '\003', '\370', 'B', '\001', 'B', '\316', '\001', '\n', '?', 'i', 'o', '.', 'e',
|
||||
'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n',
|
||||
's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'h', 't', 't', 'p', '.', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's',
|
||||
'e', 's', 's', 'i', 'o', 'n', '.', 'v', '3', 'B', '\024', 'S', 't', 'a', 't', 'e', 'f', 'u', 'l', 'S', 'e', 's', 's', 'i', 'o',
|
||||
'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', 'k', 'g', 'i', 't', 'h', 'u', 'b', '.', 'c', 'o', 'm', '/', 'e', 'n', 'v', 'o',
|
||||
'y', 'p', 'r', 'o', 'x', 'y', '/', 'g', 'o', '-', 'c', 'o', 'n', 't', 'r', 'o', 'l', '-', 'p', 'l', 'a', 'n', 'e', '/', 'e',
|
||||
'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 'f', 'i', 'l', 't', 'e', 'r', 's', '/', 'h',
|
||||
't', 't', 'p', '/', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '/', 'v', '3', ';', 's',
|
||||
't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i', 'o', 'n', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002',
|
||||
'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
|
||||
}; |
||||
|
||||
static _upb_DefPool_Init *deps[4] = { |
||||
&envoy_config_core_v3_extension_proto_upbdefinit, |
||||
&udpa_annotations_status_proto_upbdefinit, |
||||
&validate_validate_proto_upbdefinit, |
||||
NULL |
||||
}; |
||||
|
||||
_upb_DefPool_Init envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_upbdefinit = { |
||||
deps, |
||||
&envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_upb_file_layout, |
||||
"envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto", |
||||
UPB_STRINGVIEW_INIT(descriptor, 733) |
||||
}; |
@ -1,40 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/extensions/filters/http/stateful_session/v3/stateful_session.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef ENVOY_EXTENSIONS_FILTERS_HTTP_STATEFUL_SESSION_V3_STATEFUL_SESSION_PROTO_UPBDEFS_H_ |
||||
#define ENVOY_EXTENSIONS_FILTERS_HTTP_STATEFUL_SESSION_V3_STATEFUL_SESSION_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 envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_upbdefinit; |
||||
|
||||
UPB_INLINE const upb_MessageDef *envoy_extensions_filters_http_stateful_session_v3_StatefulSession_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "envoy.extensions.filters.http.stateful_session.v3.StatefulSession"); |
||||
} |
||||
|
||||
UPB_INLINE const upb_MessageDef *envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &envoy_extensions_filters_http_stateful_session_v3_stateful_session_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "envoy.extensions.filters.http.stateful_session.v3.StatefulSessionPerRoute"); |
||||
} |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* ENVOY_EXTENSIONS_FILTERS_HTTP_STATEFUL_SESSION_V3_STATEFUL_SESSION_PROTO_UPBDEFS_H_ */ |
@ -1,50 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/extensions/http/stateful_session/cookie/v3/cookie.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#include "upb/def.h" |
||||
#include "envoy/extensions/http/stateful_session/cookie/v3/cookie.upbdefs.h" |
||||
#include "envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.h" |
||||
|
||||
extern _upb_DefPool_Init envoy_type_http_v3_cookie_proto_upbdefinit; |
||||
extern _upb_DefPool_Init udpa_annotations_status_proto_upbdefinit; |
||||
extern _upb_DefPool_Init validate_validate_proto_upbdefinit; |
||||
static const char descriptor[487] = {'\n', '=', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 'h', 't', 't', 'p', '/', 's',
|
||||
't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '/', 'c', 'o', 'o', 'k', 'i', 'e', '/', 'v', '3',
|
||||
'/', 'c', 'o', 'o', 'k', 'i', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '0', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e',
|
||||
'n', 's', 'i', 'o', 'n', 's', '.', 'h', 't', 't', 'p', '.', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's',
|
||||
'i', 'o', 'n', '.', 'c', 'o', 'o', 'k', 'i', 'e', '.', 'v', '3', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e',
|
||||
'/', 'h', 't', 't', 'p', '/', 'v', '3', '/', 'c', 'o', 'o', 'k', 'i', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd',
|
||||
'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o',
|
||||
't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o',
|
||||
't', 'o', '\"', 'W', '\n', '\027', 'C', 'o', 'o', 'k', 'i', 'e', 'B', 'a', 's', 'e', 'd', 'S', 'e', 's', 's', 'i', 'o', 'n', 'S',
|
||||
't', 'a', 't', 'e', '\022', '<', '\n', '\006', 'c', 'o', 'o', 'k', 'i', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'e', 'n',
|
||||
'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'h', 't', 't', 'p', '.', 'v', '3', '.', 'C', 'o', 'o', 'k', 'i', 'e', 'B', '\010',
|
||||
'\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\006', 'c', 'o', 'o', 'k', 'i', 'e', 'B', '\271', '\001', '\n', '>', 'i', 'o', '.', 'e',
|
||||
'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n',
|
||||
's', '.', 'h', 't', 't', 'p', '.', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '.', 'c',
|
||||
'o', 'o', 'k', 'i', 'e', '.', 'v', '3', 'B', '\013', 'C', 'o', 'o', 'k', 'i', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '`',
|
||||
'g', 'i', 't', 'h', 'u', 'b', '.', 'c', 'o', 'm', '/', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '/', 'g', 'o', '-',
|
||||
'c', 'o', 'n', 't', 'r', 'o', 'l', '-', 'p', 'l', 'a', 'n', 'e', '/', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n',
|
||||
's', 'i', 'o', 'n', 's', '/', 'h', 't', 't', 'p', '/', 's', 't', 'a', 't', 'e', 'f', 'u', 'l', '_', 's', 'e', 's', 's', 'i',
|
||||
'o', 'n', '/', 'c', 'o', 'o', 'k', 'i', 'e', '/', 'v', '3', ';', 'c', 'o', 'o', 'k', 'i', 'e', 'v', '3', '\272', '\200', '\310', '\321',
|
||||
'\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
|
||||
}; |
||||
|
||||
static _upb_DefPool_Init *deps[4] = { |
||||
&envoy_type_http_v3_cookie_proto_upbdefinit, |
||||
&udpa_annotations_status_proto_upbdefinit, |
||||
&validate_validate_proto_upbdefinit, |
||||
NULL |
||||
}; |
||||
|
||||
_upb_DefPool_Init envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_upbdefinit = { |
||||
deps, |
||||
&envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_upb_file_layout, |
||||
"envoy/extensions/http/stateful_session/cookie/v3/cookie.proto", |
||||
UPB_STRINGVIEW_INIT(descriptor, 487) |
||||
}; |
@ -1,35 +0,0 @@ |
||||
/* This file was generated by upbc (the upb compiler) from the input
|
||||
* file: |
||||
* |
||||
* envoy/extensions/http/stateful_session/cookie/v3/cookie.proto |
||||
* |
||||
* Do not edit -- your changes will be discarded when the file is |
||||
* regenerated. */ |
||||
|
||||
#ifndef ENVOY_EXTENSIONS_HTTP_STATEFUL_SESSION_COOKIE_V3_COOKIE_PROTO_UPBDEFS_H_ |
||||
#define ENVOY_EXTENSIONS_HTTP_STATEFUL_SESSION_COOKIE_V3_COOKIE_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 envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_upbdefinit; |
||||
|
||||
UPB_INLINE const upb_MessageDef *envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_getmsgdef(upb_DefPool *s) { |
||||
_upb_DefPool_LoadDefInit(s, &envoy_extensions_http_stateful_session_cookie_v3_cookie_proto_upbdefinit); |
||||
return upb_DefPool_FindMessageByName(s, "envoy.extensions.http.stateful_session.cookie.v3.CookieBasedSessionState"); |
||||
} |
||||
|
||||
#ifdef __cplusplus |
||||
} /* extern "C" */ |
||||
#endif |
||||
|
||||
#include "upb/port_undef.inc" |
||||
|
||||
#endif /* ENVOY_EXTENSIONS_HTTP_STATEFUL_SESSION_COOKIE_V3_COOKIE_PROTO_UPBDEFS_H_ */ |
@ -1,227 +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_http_stateful_session_filter.h" |
||||
|
||||
#include <stdint.h> |
||||
|
||||
#include <string> |
||||
#include <utility> |
||||
|
||||
#include "absl/status/statusor.h" |
||||
#include "absl/strings/str_cat.h" |
||||
#include "absl/strings/string_view.h" |
||||
#include "absl/types/variant.h" |
||||
#include "envoy/config/core/v3/extension.upb.h" |
||||
#include "envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h" |
||||
#include "envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.h" |
||||
#include "envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.h" |
||||
#include "envoy/extensions/http/stateful_session/cookie/v3/cookie.upbdefs.h" |
||||
#include "envoy/type/http/v3/cookie.upb.h" |
||||
#include "envoy/type/v3/percent.upb.h" |
||||
#include "google/protobuf/wrappers.upb.h" |
||||
#include "upb/def.h" |
||||
|
||||
#include <grpc/status.h> |
||||
|
||||
#include "src/core/ext/filters/stateful_session/stateful_session_filter.h" |
||||
#include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h" |
||||
#include "src/core/ext/xds/upb_utils.h" |
||||
#include "src/core/ext/xds/xds_common_types.h" |
||||
#include "src/core/ext/xds/xds_http_filters.h" |
||||
#include "src/core/lib/channel/channel_args.h" |
||||
#include "src/core/lib/channel/status_util.h" |
||||
#include "src/core/lib/gprpp/time.h" |
||||
#include "src/core/lib/gprpp/validation_errors.h" |
||||
#include "src/core/lib/json/json.h" |
||||
#include "src/core/lib/transport/status_conversion.h" |
||||
|
||||
namespace grpc_core { |
||||
|
||||
absl::string_view XdsHttpStatefulSessionFilter::ConfigProtoName() const { |
||||
return "envoy.extensions.filters.http.stateful_session.v3.StatefulSession"; |
||||
} |
||||
|
||||
absl::string_view XdsHttpStatefulSessionFilter::OverrideConfigProtoName() |
||||
const { |
||||
return "envoy.extensions.filters.http.stateful_session.v3" |
||||
".StatefulSessionPerRoute"; |
||||
} |
||||
|
||||
void XdsHttpStatefulSessionFilter::PopulateSymtab(upb_DefPool* symtab) const { |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSession_getmsgdef( |
||||
symtab); |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_getmsgdef( |
||||
symtab); |
||||
envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_getmsgdef( |
||||
symtab); |
||||
} |
||||
|
||||
namespace { |
||||
|
||||
Json::Object ValidateStatefulSession( |
||||
const XdsResourceType::DecodeContext& context, |
||||
const envoy_extensions_filters_http_stateful_session_v3_StatefulSession* |
||||
stateful_session, |
||||
ValidationErrors* errors) { |
||||
ValidationErrors::ScopedField field(errors, ".session_state"); |
||||
const auto* session_state = |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSession_session_state( |
||||
stateful_session); |
||||
if (session_state == nullptr) { |
||||
errors->AddError("field not present"); |
||||
return {}; |
||||
} |
||||
ValidationErrors::ScopedField field2(errors, ".typed_config"); |
||||
const auto* typed_config = |
||||
envoy_config_core_v3_TypedExtensionConfig_typed_config(session_state); |
||||
auto extension = ExtractXdsExtension(context, typed_config, errors); |
||||
if (!extension.has_value()) return {}; |
||||
if (extension->type != |
||||
"envoy.extensions.http.stateful_session.cookie.v3" |
||||
".CookieBasedSessionState") { |
||||
errors->AddError("unsupported session state type"); |
||||
return {}; |
||||
} |
||||
absl::string_view* serialized_session_state = |
||||
absl::get_if<absl::string_view>(&extension->value); |
||||
if (serialized_session_state == nullptr) { |
||||
errors->AddError("could not parse session state config"); |
||||
return {}; |
||||
} |
||||
auto* cookie_state = |
||||
envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_parse( |
||||
serialized_session_state->data(), serialized_session_state->size(), |
||||
context.arena); |
||||
if (cookie_state == nullptr) { |
||||
errors->AddError("could not parse session state config"); |
||||
return {}; |
||||
} |
||||
ValidationErrors::ScopedField field3(errors, ".cookie"); |
||||
const auto* cookie = |
||||
envoy_extensions_http_stateful_session_cookie_v3_CookieBasedSessionState_cookie( |
||||
cookie_state); |
||||
if (cookie == nullptr) { |
||||
errors->AddError("field not present"); |
||||
return {}; |
||||
} |
||||
Json::Object cookie_config; |
||||
// name
|
||||
std::string cookie_name = |
||||
UpbStringToStdString(envoy_type_http_v3_Cookie_name(cookie)); |
||||
if (cookie_name.empty()) { |
||||
ValidationErrors::ScopedField field(errors, ".name"); |
||||
errors->AddError("field not present"); |
||||
} |
||||
cookie_config["name"] = std::move(cookie_name); |
||||
// ttl
|
||||
{ |
||||
ValidationErrors::ScopedField field(errors, ".ttl"); |
||||
const auto* duration = envoy_type_http_v3_Cookie_ttl(cookie); |
||||
if (duration != nullptr) { |
||||
Duration ttl = ParseDuration(duration, errors); |
||||
cookie_config["ttl"] = ttl.ToJsonString(); |
||||
} |
||||
} |
||||
// path
|
||||
std::string path = |
||||
UpbStringToStdString(envoy_type_http_v3_Cookie_path(cookie)); |
||||
if (!path.empty()) cookie_config["path"] = std::move(path); |
||||
return cookie_config; |
||||
} |
||||
|
||||
} // namespace
|
||||
|
||||
absl::optional<XdsHttpFilterImpl::FilterConfig> |
||||
XdsHttpStatefulSessionFilter::GenerateFilterConfig( |
||||
const XdsResourceType::DecodeContext& context, XdsExtension extension, |
||||
ValidationErrors* errors) const { |
||||
absl::string_view* serialized_filter_config = |
||||
absl::get_if<absl::string_view>(&extension.value); |
||||
if (serialized_filter_config == nullptr) { |
||||
errors->AddError("could not parse stateful session filter config"); |
||||
return absl::nullopt; |
||||
} |
||||
auto* stateful_session = |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSession_parse( |
||||
serialized_filter_config->data(), serialized_filter_config->size(), |
||||
context.arena); |
||||
if (stateful_session == nullptr) { |
||||
errors->AddError("could not parse stateful session filter config"); |
||||
return absl::nullopt; |
||||
} |
||||
return FilterConfig{ |
||||
ConfigProtoName(), |
||||
ValidateStatefulSession(context, stateful_session, errors)}; |
||||
} |
||||
|
||||
absl::optional<XdsHttpFilterImpl::FilterConfig> |
||||
XdsHttpStatefulSessionFilter::GenerateFilterConfigOverride( |
||||
const XdsResourceType::DecodeContext& context, XdsExtension extension, |
||||
ValidationErrors* errors) const { |
||||
absl::string_view* serialized_filter_config = |
||||
absl::get_if<absl::string_view>(&extension.value); |
||||
if (serialized_filter_config == nullptr) { |
||||
errors->AddError("could not parse stateful session filter override config"); |
||||
return absl::nullopt; |
||||
} |
||||
auto* stateful_session_per_route = |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_parse( |
||||
serialized_filter_config->data(), serialized_filter_config->size(), |
||||
context.arena); |
||||
if (stateful_session_per_route == nullptr) { |
||||
errors->AddError("could not parse stateful session filter override config"); |
||||
return absl::nullopt; |
||||
} |
||||
Json::Object config; |
||||
if (!envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_disabled( |
||||
stateful_session_per_route)) { |
||||
ValidationErrors::ScopedField field(errors, ".stateful_session"); |
||||
const auto* stateful_session = |
||||
envoy_extensions_filters_http_stateful_session_v3_StatefulSessionPerRoute_stateful_session( |
||||
stateful_session_per_route); |
||||
if (stateful_session == nullptr) { |
||||
errors->AddError("field not present"); |
||||
} else { |
||||
config = ValidateStatefulSession(context, stateful_session, errors); |
||||
} |
||||
} |
||||
return FilterConfig{OverrideConfigProtoName(), Json(std::move(config))}; |
||||
} |
||||
|
||||
const grpc_channel_filter* XdsHttpStatefulSessionFilter::channel_filter() |
||||
const { |
||||
return &StatefulSessionFilter::kFilter; |
||||
} |
||||
|
||||
ChannelArgs XdsHttpStatefulSessionFilter::ModifyChannelArgs( |
||||
const ChannelArgs& args) const { |
||||
return args.Set(GRPC_ARG_PARSE_STATEFUL_SESSION_METHOD_CONFIG, 1); |
||||
} |
||||
|
||||
absl::StatusOr<XdsHttpFilterImpl::ServiceConfigJsonEntry> |
||||
XdsHttpStatefulSessionFilter::GenerateServiceConfig( |
||||
const FilterConfig& hcm_filter_config, |
||||
const FilterConfig* filter_config_override) const { |
||||
Json config = filter_config_override != nullptr |
||||
? filter_config_override->config |
||||
: hcm_filter_config.config; |
||||
return ServiceConfigJsonEntry{"stateful_session", config.Dump()}; |
||||
} |
||||
|
||||
} // namespace grpc_core
|
@ -1,58 +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_HTTP_STATEFUL_SESSION_FILTER_H |
||||
#define GRPC_CORE_EXT_XDS_XDS_HTTP_STATEFUL_SESSION_FILTER_H |
||||
|
||||
#include <grpc/support/port_platform.h> |
||||
|
||||
#include "absl/status/statusor.h" |
||||
#include "absl/strings/string_view.h" |
||||
#include "absl/types/optional.h" |
||||
#include "upb/arena.h" |
||||
#include "upb/def.h" |
||||
|
||||
#include "src/core/ext/xds/xds_common_types.h" |
||||
#include "src/core/ext/xds/xds_http_filters.h" |
||||
#include "src/core/lib/channel/channel_args.h" |
||||
#include "src/core/lib/channel/channel_fwd.h" |
||||
#include "src/core/lib/gprpp/validation_errors.h" |
||||
|
||||
namespace grpc_core { |
||||
|
||||
class XdsHttpStatefulSessionFilter : public XdsHttpFilterImpl { |
||||
public: |
||||
absl::string_view ConfigProtoName() const override; |
||||
absl::string_view OverrideConfigProtoName() const override; |
||||
void PopulateSymtab(upb_DefPool* symtab) const override; |
||||
absl::optional<FilterConfig> GenerateFilterConfig( |
||||
const XdsResourceType::DecodeContext& context, XdsExtension extension, |
||||
ValidationErrors* errors) const override; |
||||
absl::optional<FilterConfig> GenerateFilterConfigOverride( |
||||
const XdsResourceType::DecodeContext& context, XdsExtension extension, |
||||
ValidationErrors* errors) const override; |
||||
const grpc_channel_filter* channel_filter() const override; |
||||
ChannelArgs ModifyChannelArgs(const ChannelArgs& args) const override; |
||||
absl::StatusOr<ServiceConfigJsonEntry> GenerateServiceConfig( |
||||
const FilterConfig& hcm_filter_config, |
||||
const FilterConfig* filter_config_override) const override; |
||||
bool IsSupportedOnClients() const override { return true; } |
||||
bool IsSupportedOnServers() const override { return false; } |
||||
}; |
||||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_CORE_EXT_XDS_XDS_HTTP_STATEFUL_SESSION_FILTER_H
|
@ -1,38 +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. |
||||
|
||||
// Local copy of Envoy xDS proto file, used for testing only. |
||||
|
||||
syntax = "proto3"; |
||||
|
||||
package envoy.type.http.v3; |
||||
|
||||
import "google/protobuf/duration.proto"; |
||||
|
||||
// [#protodoc-title: Http cookie API] |
||||
|
||||
// Cookie defines an API for obtaining or generating HTTP cookie. |
||||
message Cookie { |
||||
// The name that will be used to obtain cookie value from downstream HTTP request or generate |
||||
// new cookie for downstream. |
||||
string name = 1; |
||||
|
||||
// Duration of cookie. This will be used to set the expiry time of a new cookie when it is |
||||
// generated. Set this to 0 to use a session cookie. |
||||
google.protobuf.Duration ttl = 2; |
||||
|
||||
// Path of cookie. This will be used to set the path of a new cookie when it is generated. |
||||
// If no path is specified here, no path will be set for the cookie. |
||||
string path = 3; |
||||
} |
@ -1,44 +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. |
||||
|
||||
// Local copy of Envoy xDS proto file, used for testing only. |
||||
|
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.filters.http.stateful_session.v3; |
||||
|
||||
import "src/proto/grpc/testing/xds/v3/extension.proto"; |
||||
|
||||
// [#protodoc-title: Stateful session filter] |
||||
// Stateful session :ref:`configuration overview <config_http_filters_stateful_session>`. |
||||
// [#extension: envoy.filters.http.stateful_session] |
||||
|
||||
message StatefulSession { |
||||
// Specific implementation of session state. This session state will be used to store and |
||||
// get address of the upstream host to which the session is assigned. |
||||
// |
||||
// [#extension-category: envoy.http.stateful_session] |
||||
config.core.v3.TypedExtensionConfig session_state = 1; |
||||
} |
||||
|
||||
message StatefulSessionPerRoute { |
||||
oneof override { |
||||
// Disable the stateful session filter for this particular vhost or route. If disabled is |
||||
// specified in multiple per-filter-configs, the most specific one will be used. |
||||
bool disabled = 1; |
||||
|
||||
// Per-route stateful session configuration that can be served by RDS or static route table. |
||||
StatefulSession stateful_session = 2; |
||||
} |
||||
} |
@ -1,50 +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. |
||||
|
||||
// Local copy of Envoy xDS proto file, used for testing only. |
||||
|
||||
syntax = "proto3"; |
||||
|
||||
package envoy.extensions.http.stateful_session.cookie.v3; |
||||
|
||||
import "src/proto/grpc/testing/xds/v3/cookie.proto"; |
||||
|
||||
// [#protodoc-title: Cookie based stateful session extension] |
||||
|
||||
// This extension allows the session state to be tracked via cookies. |
||||
// |
||||
// This extension first encodes the address of the upstream host selected by the load balancer |
||||
// into a ``set-cookie`` response header with the :ref:`cookie configuration |
||||
// <envoy_v3_api_field_extensions.http.stateful_session.cookie.v3.CookieBasedSessionState.cookie>`. |
||||
// when new requests are incoming, this extension will try to parse the specific upstream host |
||||
// address by the cookie name. If the address parsed from the cookie corresponds to a valid |
||||
// upstream host, this upstream host will be selected first. See :ref:`stateful session filter |
||||
// <envoy_v3_api_msg_extensions.filters.http.stateful_session.v3.StatefulSession>`. |
||||
// |
||||
// For example, if the cookie name is set to ``sticky-host``, envoy will prefer ``1.2.3.4:80`` |
||||
// as the upstream host when the request contains the following header: |
||||
// |
||||
// .. code-block:: none |
||||
// |
||||
// cookie: sticky-host="MS4yLjMuNDo4MA==" |
||||
// |
||||
// When processing the upstream response, if ``1.2.3.4:80`` is indeed the final choice the extension |
||||
// does nothing. If ``1.2.3.4:80`` is not the final choice, the new selected host will be used to |
||||
// update the cookie (via the ``set-cookie`` response header). |
||||
// |
||||
// [#extension: envoy.http.stateful_session.cookie] |
||||
message CookieBasedSessionState { |
||||
// The cookie configuration used to track session state. |
||||
type.http.v3.Cookie cookie = 1; |
||||
} |
Loading…
Reference in new issue