grpc 0.14.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (277) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +1398 -817
  3. data/include/grpc/compression.h +2 -1
  4. data/include/grpc/grpc.h +10 -1
  5. data/include/grpc/grpc_cronet.h +51 -0
  6. data/include/grpc/grpc_posix.h +70 -0
  7. data/include/grpc/impl/codegen/atm.h +2 -2
  8. data/include/grpc/impl/codegen/{atm_win32.h → atm_windows.h} +3 -3
  9. data/include/grpc/impl/codegen/compression_types.h +39 -5
  10. data/include/grpc/impl/codegen/connectivity_state.h +1 -1
  11. data/include/grpc/impl/codegen/grpc_types.h +10 -0
  12. data/include/grpc/impl/codegen/log.h +2 -1
  13. data/include/grpc/impl/codegen/port_platform.h +30 -12
  14. data/include/grpc/impl/codegen/slice_buffer.h +2 -3
  15. data/include/grpc/impl/codegen/sync.h +2 -2
  16. data/include/grpc/impl/codegen/{sync_win32.h → sync_windows.h} +3 -3
  17. data/include/grpc/support/{sync_win32.h → atm_windows.h} +4 -4
  18. data/include/grpc/support/avl.h +5 -0
  19. data/include/grpc/support/{log_win32.h → log_windows.h} +3 -3
  20. data/include/grpc/support/string_util.h +2 -1
  21. data/include/grpc/support/{atm_win32.h → sync_windows.h} +4 -4
  22. data/src/core/ext/census/gen/census.pb.c +179 -0
  23. data/src/core/ext/census/gen/census.pb.h +294 -0
  24. data/src/core/ext/census/grpc_filter.c +11 -7
  25. data/src/core/ext/client_config/channel_connectivity.c +28 -14
  26. data/src/core/ext/client_config/client_channel.c +77 -53
  27. data/src/core/ext/client_config/connector.h +1 -1
  28. data/src/core/ext/client_config/lb_policy.c +9 -6
  29. data/src/core/ext/client_config/lb_policy.h +9 -5
  30. data/src/core/ext/client_config/subchannel.c +58 -39
  31. data/src/core/ext/client_config/subchannel.h +3 -2
  32. data/src/core/ext/client_config/subchannel_call_holder.c +34 -19
  33. data/src/core/ext/client_config/subchannel_call_holder.h +2 -1
  34. data/src/core/ext/client_config/subchannel_index.c +20 -9
  35. data/src/core/ext/lb_policy/grpclb/load_balancer_api.c +7 -7
  36. data/src/core/ext/lb_policy/grpclb/load_balancer_api.h +5 -5
  37. data/src/core/ext/lb_policy/grpclb/proto/grpc/lb/{v0 → v1}/load_balancer.pb.c +29 -30
  38. data/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +178 -0
  39. data/src/core/ext/lb_policy/pick_first/pick_first.c +65 -45
  40. data/src/core/ext/lb_policy/round_robin/round_robin.c +84 -43
  41. data/src/core/ext/load_reporting/load_reporting.c +133 -0
  42. data/src/core/ext/load_reporting/load_reporting.h +75 -0
  43. data/src/core/ext/load_reporting/load_reporting_filter.c +151 -0
  44. data/src/core/ext/load_reporting/load_reporting_filter.h +41 -0
  45. data/src/core/ext/resolver/dns/native/dns_resolver.c +22 -8
  46. data/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +2 -2
  47. data/src/core/ext/transport/chttp2/client/insecure/channel_create.c +4 -4
  48. data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c +95 -0
  49. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +14 -18
  50. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +49 -24
  51. data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +82 -0
  52. data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +104 -60
  53. data/src/core/ext/transport/chttp2/transport/bin_decoder.c +232 -0
  54. data/src/{ruby/ext/grpc/rb_signal.c → core/ext/transport/chttp2/transport/bin_decoder.h} +27 -31
  55. data/src/core/ext/transport/chttp2/transport/chttp2_transport.c +481 -260
  56. data/src/core/ext/transport/chttp2/transport/frame.h +1 -7
  57. data/src/core/ext/transport/chttp2/transport/frame_data.c +44 -27
  58. data/src/core/ext/transport/chttp2/transport/frame_data.h +6 -5
  59. data/src/core/ext/transport/chttp2/transport/frame_goaway.c +23 -17
  60. data/src/core/ext/transport/chttp2/transport/frame_goaway.h +2 -2
  61. data/src/core/ext/transport/chttp2/transport/frame_ping.c +12 -7
  62. data/src/core/ext/transport/chttp2/transport/frame_ping.h +3 -3
  63. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +25 -12
  64. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +2 -2
  65. data/src/core/ext/transport/chttp2/transport/frame_settings.c +23 -21
  66. data/src/core/ext/transport/chttp2/transport/frame_settings.h +2 -2
  67. data/src/core/ext/transport/chttp2/transport/frame_window_update.c +17 -9
  68. data/src/core/ext/transport/chttp2/transport/frame_window_update.h +2 -2
  69. data/src/core/ext/transport/chttp2/transport/hpack_parser.c +365 -287
  70. data/src/core/ext/transport/chttp2/transport/hpack_parser.h +8 -6
  71. data/src/core/ext/transport/chttp2/transport/hpack_table.c +24 -20
  72. data/src/core/ext/transport/chttp2/transport/hpack_table.h +5 -4
  73. data/src/core/ext/transport/chttp2/transport/incoming_metadata.c +1 -0
  74. data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +1 -0
  75. data/src/core/ext/transport/chttp2/transport/internal.h +34 -32
  76. data/src/core/ext/transport/chttp2/transport/parsing.c +296 -212
  77. data/src/core/ext/transport/chttp2/transport/writing.c +12 -9
  78. data/src/core/lib/channel/channel_args.c +26 -12
  79. data/src/core/lib/channel/channel_args.h +1 -1
  80. data/src/core/lib/channel/channel_stack.c +12 -8
  81. data/src/core/lib/channel/channel_stack.h +27 -11
  82. data/src/core/lib/channel/channel_stack_builder.c +2 -2
  83. data/src/core/lib/channel/compress_filter.c +26 -31
  84. data/src/core/lib/channel/compress_filter.h +4 -4
  85. data/src/core/lib/channel/connected_channel.c +7 -5
  86. data/src/core/lib/channel/http_client_filter.c +34 -8
  87. data/src/core/lib/channel/http_client_filter.h +1 -1
  88. data/src/core/lib/channel/http_server_filter.c +21 -12
  89. data/src/core/lib/compression/{compression_algorithm.c → compression.c} +22 -21
  90. data/src/core/lib/http/httpcli.c +81 -59
  91. data/src/core/lib/http/httpcli.h +11 -15
  92. data/src/core/lib/http/httpcli_security_connector.c +5 -3
  93. data/src/core/lib/http/parser.c +127 -118
  94. data/src/core/lib/http/parser.h +11 -6
  95. data/src/core/lib/iomgr/closure.c +20 -16
  96. data/src/core/lib/iomgr/closure.h +19 -15
  97. data/src/core/lib/iomgr/endpoint.h +1 -1
  98. data/src/core/lib/iomgr/endpoint_pair_posix.c +2 -2
  99. data/src/core/lib/iomgr/error.c +535 -0
  100. data/src/core/lib/iomgr/error.h +192 -0
  101. data/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +190 -83
  102. data/src/core/lib/iomgr/ev_poll_posix.c +1267 -0
  103. data/src/{ruby/ext/grpc/rb_signal.h → core/lib/iomgr/ev_poll_posix.h} +7 -5
  104. data/src/core/lib/iomgr/ev_posix.c +104 -14
  105. data/src/core/lib/iomgr/ev_posix.h +17 -7
  106. data/src/core/lib/iomgr/exec_ctx.c +25 -7
  107. data/src/core/lib/iomgr/exec_ctx.h +27 -8
  108. data/src/core/lib/iomgr/executor.c +2 -2
  109. data/src/core/lib/iomgr/executor.h +1 -1
  110. data/src/core/lib/iomgr/iocp_windows.c +2 -41
  111. data/src/core/lib/iomgr/iocp_windows.h +0 -8
  112. data/src/core/lib/iomgr/iomgr.c +5 -4
  113. data/src/core/lib/iomgr/iomgr_posix.c +5 -1
  114. data/src/core/lib/iomgr/iomgr_windows.c +1 -1
  115. data/src/core/lib/{support → iomgr}/load_file.c +15 -17
  116. data/src/core/lib/{support → iomgr}/load_file.h +8 -7
  117. data/src/core/lib/iomgr/polling_entity.c +104 -0
  118. data/src/core/lib/iomgr/polling_entity.h +81 -0
  119. data/src/core/lib/iomgr/pollset.h +6 -5
  120. data/src/core/lib/iomgr/pollset_set_windows.c +4 -1
  121. data/src/core/lib/iomgr/pollset_windows.c +10 -6
  122. data/src/core/lib/iomgr/resolve_address.h +5 -9
  123. data/src/core/lib/iomgr/resolve_address_posix.c +55 -38
  124. data/src/core/lib/iomgr/resolve_address_windows.c +51 -37
  125. data/src/core/lib/iomgr/sockaddr.h +2 -2
  126. data/src/core/lib/iomgr/{sockaddr_win32.h → sockaddr_windows.h} +3 -3
  127. data/src/core/lib/iomgr/socket_utils_common_posix.c +92 -45
  128. data/src/core/lib/iomgr/socket_utils_posix.h +19 -12
  129. data/src/core/lib/iomgr/socket_windows.c +61 -2
  130. data/src/core/lib/iomgr/socket_windows.h +13 -0
  131. data/src/core/lib/iomgr/tcp_client_posix.c +54 -39
  132. data/src/core/lib/iomgr/tcp_client_windows.c +34 -34
  133. data/src/core/lib/iomgr/tcp_posix.c +43 -39
  134. data/src/core/lib/iomgr/tcp_server.h +5 -3
  135. data/src/core/lib/iomgr/tcp_server_posix.c +103 -64
  136. data/src/core/lib/iomgr/tcp_server_windows.c +114 -101
  137. data/src/core/lib/iomgr/tcp_windows.c +45 -50
  138. data/src/core/lib/iomgr/tcp_windows.h +1 -1
  139. data/src/core/lib/iomgr/timer.c +26 -13
  140. data/src/core/lib/iomgr/udp_server.c +28 -4
  141. data/src/core/lib/iomgr/udp_server.h +5 -1
  142. data/src/core/lib/iomgr/unix_sockets_posix.c +8 -7
  143. data/src/core/lib/iomgr/unix_sockets_posix.h +2 -1
  144. data/src/core/lib/iomgr/unix_sockets_posix_noop.c +4 -2
  145. data/src/core/lib/iomgr/wakeup_fd_eventfd.c +15 -5
  146. data/src/core/lib/iomgr/wakeup_fd_pipe.c +13 -9
  147. data/src/core/lib/iomgr/wakeup_fd_posix.c +6 -6
  148. data/src/core/lib/iomgr/wakeup_fd_posix.h +9 -6
  149. data/src/core/lib/iomgr/workqueue.h +5 -4
  150. data/src/core/lib/iomgr/workqueue_posix.c +40 -26
  151. data/src/core/lib/iomgr/workqueue_windows.c +2 -2
  152. data/src/core/lib/profiling/basic_timers.c +2 -2
  153. data/src/core/lib/security/{security_context.c → context/security_context.c} +1 -1
  154. data/src/core/lib/security/{security_context.h → context/security_context.h} +4 -4
  155. data/src/core/lib/security/credentials/composite/composite_credentials.c +263 -0
  156. data/src/core/lib/security/credentials/composite/composite_credentials.h +72 -0
  157. data/src/core/lib/security/credentials/credentials.c +233 -0
  158. data/src/core/lib/security/{credentials.h → credentials/credentials.h} +19 -157
  159. data/src/core/lib/security/{credentials_metadata.c → credentials/credentials_metadata.c} +1 -1
  160. data/src/core/lib/security/credentials/fake/fake_credentials.c +139 -0
  161. data/src/core/lib/security/credentials/fake/fake_credentials.h +56 -0
  162. data/src/core/lib/security/{credentials_posix.c → credentials/google_default/credentials_posix.c} +1 -1
  163. data/src/core/lib/security/{credentials_win32.c → credentials/google_default/credentials_windows.c} +3 -3
  164. data/src/core/lib/security/{google_default_credentials.c → credentials/google_default/google_default_credentials.c} +93 -35
  165. data/src/core/lib/security/credentials/google_default/google_default_credentials.h +46 -0
  166. data/src/core/lib/security/credentials/iam/iam_credentials.c +85 -0
  167. data/src/core/lib/security/credentials/iam/iam_credentials.h +44 -0
  168. data/src/core/lib/security/{json_token.c → credentials/jwt/json_token.c} +10 -101
  169. data/src/core/lib/security/{json_token.h → credentials/jwt/json_token.h} +3 -33
  170. data/src/core/lib/security/credentials/jwt/jwt_credentials.c +160 -0
  171. data/src/core/lib/security/credentials/jwt/jwt_credentials.h +62 -0
  172. data/src/core/lib/security/{jwt_verifier.c → credentials/jwt/jwt_verifier.c} +35 -15
  173. data/src/core/lib/security/{jwt_verifier.h → credentials/jwt/jwt_verifier.h} +3 -3
  174. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +433 -0
  175. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +109 -0
  176. data/src/core/lib/security/credentials/plugin/plugin_credentials.c +129 -0
  177. data/src/core/lib/security/credentials/plugin/plugin_credentials.h +45 -0
  178. data/src/core/lib/security/credentials/ssl/ssl_credentials.c +240 -0
  179. data/src/core/lib/security/credentials/ssl/ssl_credentials.h +48 -0
  180. data/src/core/lib/security/{auth_filters.h → transport/auth_filters.h} +3 -3
  181. data/src/core/lib/security/{client_auth_filter.c → transport/client_auth_filter.c} +27 -20
  182. data/src/core/lib/security/{handshake.c → transport/handshake.c} +77 -45
  183. data/src/core/lib/security/{handshake.h → transport/handshake.h} +9 -11
  184. data/src/core/lib/security/{secure_endpoint.c → transport/secure_endpoint.c} +19 -12
  185. data/src/core/lib/security/{secure_endpoint.h → transport/secure_endpoint.h} +3 -3
  186. data/src/core/lib/security/{security_connector.c → transport/security_connector.c} +26 -17
  187. data/src/core/lib/security/{security_connector.h → transport/security_connector.h} +8 -8
  188. data/src/core/lib/security/{server_auth_filter.c → transport/server_auth_filter.c} +24 -16
  189. data/src/core/lib/security/transport/tsi_error.c +40 -0
  190. data/src/core/lib/security/transport/tsi_error.h +42 -0
  191. data/src/core/lib/security/{b64.c → util/b64.c} +1 -1
  192. data/src/core/lib/security/{b64.h → util/b64.h} +3 -3
  193. data/src/core/lib/security/util/json_util.c +61 -0
  194. data/src/core/lib/security/util/json_util.h +55 -0
  195. data/src/core/lib/support/avl.c +11 -0
  196. data/src/core/lib/support/cpu_windows.c +2 -2
  197. data/src/core/lib/support/{env_win32.c → env_windows.c} +3 -3
  198. data/src/core/lib/support/log.c +3 -1
  199. data/src/core/lib/support/log_linux.c +2 -2
  200. data/src/core/lib/support/{log_win32.c → log_windows.c} +4 -4
  201. data/src/core/lib/support/murmur_hash.c +3 -5
  202. data/src/core/lib/support/string.c +10 -0
  203. data/src/core/lib/support/string.h +4 -0
  204. data/src/core/lib/support/{string_util_win32.c → string_util_windows.c} +3 -3
  205. data/src/core/lib/support/{string_win32.c → string_windows.c} +2 -2
  206. data/src/core/lib/support/{string_win32.h → string_windows.h} +5 -5
  207. data/src/core/lib/support/subprocess_windows.c +1 -1
  208. data/src/core/lib/support/{sync_win32.c → sync_windows.c} +2 -2
  209. data/src/core/lib/support/{thd_win32.c → thd_windows.c} +2 -2
  210. data/src/core/lib/support/{time_win32.c → time_windows.c} +2 -2
  211. data/src/core/lib/support/tmpfile_msys.c +1 -1
  212. data/src/core/lib/support/{tmpfile_win32.c → tmpfile_windows.c} +3 -3
  213. data/src/core/lib/surface/alarm.c +2 -2
  214. data/src/core/lib/surface/byte_buffer_reader.c +13 -6
  215. data/src/core/lib/surface/call.c +323 -123
  216. data/src/core/lib/surface/call.h +2 -0
  217. data/src/core/lib/surface/call_log_batch.c +1 -1
  218. data/src/core/lib/surface/channel.c +64 -15
  219. data/src/core/lib/surface/channel.h +9 -0
  220. data/src/core/lib/surface/channel_ping.c +3 -3
  221. data/src/core/lib/surface/completion_queue.c +75 -19
  222. data/src/core/lib/surface/completion_queue.h +7 -2
  223. data/src/core/lib/surface/init.c +2 -1
  224. data/src/core/lib/surface/init_secure.c +4 -4
  225. data/src/core/lib/surface/lame_client.c +12 -8
  226. data/src/core/lib/surface/server.c +213 -120
  227. data/src/core/lib/surface/server.h +1 -0
  228. data/src/core/lib/surface/version.c +1 -1
  229. data/src/core/lib/transport/connectivity_state.c +40 -18
  230. data/src/core/lib/transport/connectivity_state.h +4 -1
  231. data/src/core/lib/transport/metadata.c +23 -23
  232. data/src/core/lib/transport/metadata.h +4 -0
  233. data/src/core/lib/transport/metadata_batch.c +9 -0
  234. data/src/core/lib/transport/metadata_batch.h +3 -0
  235. data/src/core/lib/transport/static_metadata.c +6 -5
  236. data/src/core/lib/transport/static_metadata.h +64 -60
  237. data/src/core/lib/transport/transport.c +24 -12
  238. data/src/core/lib/transport/transport.h +6 -5
  239. data/src/core/lib/transport/transport_impl.h +4 -0
  240. data/src/core/lib/transport/transport_op_string.c +2 -2
  241. data/src/core/plugin_registry/grpc_plugin_registry.c +4 -0
  242. data/src/ruby/bin/math_services.rb +41 -2
  243. data/src/ruby/ext/grpc/rb_call.c +42 -40
  244. data/src/ruby/ext/grpc/rb_channel.c +1 -1
  245. data/src/ruby/ext/grpc/rb_completion_queue.c +59 -6
  246. data/src/ruby/ext/grpc/rb_completion_queue.h +1 -1
  247. data/src/ruby/ext/grpc/rb_grpc.c +1 -3
  248. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +12 -2
  249. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +21 -5
  250. data/src/ruby/ext/grpc/rb_loader.c +1 -1
  251. data/src/ruby/ext/grpc/rb_server.c +5 -3
  252. data/src/ruby/lib/grpc.rb +0 -3
  253. data/src/ruby/lib/grpc/errors.rb +3 -2
  254. data/src/ruby/lib/grpc/generic/active_call.rb +32 -42
  255. data/src/ruby/lib/grpc/generic/bidi_call.rb +20 -0
  256. data/src/ruby/lib/grpc/generic/client_stub.rb +31 -54
  257. data/src/ruby/lib/grpc/generic/rpc_desc.rb +4 -4
  258. data/src/ruby/lib/grpc/generic/rpc_server.rb +12 -23
  259. data/src/ruby/lib/grpc/generic/service.rb +8 -8
  260. data/src/ruby/lib/grpc/version.rb +1 -1
  261. data/src/ruby/pb/grpc/health/v1/health_services.rb +30 -2
  262. data/src/ruby/pb/grpc/testing/duplicate/echo_duplicate_services.rb +34 -4
  263. data/src/ruby/pb/grpc/testing/metrics_services.rb +39 -2
  264. data/src/ruby/pb/src/proto/grpc/testing/empty.rb +15 -0
  265. data/src/ruby/pb/src/proto/grpc/testing/messages.rb +84 -0
  266. data/src/ruby/pb/src/proto/grpc/testing/test.rb +14 -0
  267. data/src/ruby/pb/src/proto/grpc/testing/test_services.rb +110 -0
  268. data/src/ruby/pb/test/client.rb +5 -2
  269. data/src/ruby/spec/generic/active_call_spec.rb +3 -2
  270. data/src/ruby/spec/generic/client_stub_spec.rb +27 -24
  271. data/src/ruby/spec/generic/rpc_desc_spec.rb +11 -11
  272. data/src/ruby/spec/generic/rpc_server_spec.rb +42 -61
  273. data/src/ruby/spec/pb/health/checker_spec.rb +3 -5
  274. metadata +86 -48
  275. data/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h +0 -182
  276. data/src/core/lib/security/credentials.c +0 -1296
  277. data/src/ruby/lib/grpc/signals.rb +0 -69
@@ -58,8 +58,8 @@
58
58
 
59
59
  #if defined(GPR_POSIX_SYNC)
60
60
  #include <grpc/impl/codegen/sync_posix.h>
61
- #elif defined(GPR_WIN32)
62
- #include <grpc/impl/codegen/sync_win32.h>
61
+ #elif defined(GPR_WINDOWS)
62
+ #include <grpc/impl/codegen/sync_windows.h>
63
63
  #elif !defined(GPR_CUSTOM_SYNC)
64
64
  #error Unable to determine platform for sync
65
65
  #endif
@@ -31,8 +31,8 @@
31
31
  *
32
32
  */
33
33
 
34
- #ifndef GRPC_IMPL_CODEGEN_SYNC_WIN32_H
35
- #define GRPC_IMPL_CODEGEN_SYNC_WIN32_H
34
+ #ifndef GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H
35
+ #define GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H
36
36
 
37
37
  #include <grpc/impl/codegen/sync_generic.h>
38
38
 
@@ -46,4 +46,4 @@ typedef CONDITION_VARIABLE gpr_cv;
46
46
  typedef INIT_ONCE gpr_once;
47
47
  #define GPR_ONCE_INIT INIT_ONCE_STATIC_INIT
48
48
 
49
- #endif /* GRPC_IMPL_CODEGEN_SYNC_WIN32_H */
49
+ #endif /* GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H */
@@ -31,9 +31,9 @@
31
31
  *
32
32
  */
33
33
 
34
- #ifndef GRPC_SUPPORT_SYNC_WIN32_H
35
- #define GRPC_SUPPORT_SYNC_WIN32_H
34
+ #ifndef GRPC_SUPPORT_ATM_WINDOWS_H
35
+ #define GRPC_SUPPORT_ATM_WINDOWS_H
36
36
 
37
- #include <grpc/impl/codegen/sync_win32.h>
37
+ #include <grpc/impl/codegen/atm_windows.h>
38
38
 
39
- #endif /* GRPC_SUPPORT_SYNC_WIN32_H */
39
+ #endif /* GRPC_SUPPORT_ATM_WINDOWS_H */
@@ -88,5 +88,10 @@ GPRAPI gpr_avl gpr_avl_remove(gpr_avl avl, void *key);
88
88
  does not mutate avl.
89
89
  returns NULL if key is not found. */
90
90
  GPRAPI void *gpr_avl_get(gpr_avl avl, void *key);
91
+ /** Return 1 if avl contains key, 0 otherwise; if it has the key, sets *value to
92
+ its value*/
93
+ GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value);
94
+ /** Return 1 if avl is empty, 0 otherwise */
95
+ GPRAPI int gpr_avl_is_empty(gpr_avl avl);
91
96
 
92
97
  #endif /* GRPC_SUPPORT_AVL_H */
@@ -31,8 +31,8 @@
31
31
  *
32
32
  */
33
33
 
34
- #ifndef GRPC_SUPPORT_LOG_WIN32_H
35
- #define GRPC_SUPPORT_LOG_WIN32_H
34
+ #ifndef GRPC_SUPPORT_LOG_WINDOWS_H
35
+ #define GRPC_SUPPORT_LOG_WINDOWS_H
36
36
 
37
37
  #ifdef __cplusplus
38
38
  extern "C" {
@@ -48,4 +48,4 @@ GPRAPI char *gpr_format_message(int messageid);
48
48
  }
49
49
  #endif
50
50
 
51
- #endif /* GRPC_SUPPORT_LOG_WIN32_H */
51
+ #endif /* GRPC_SUPPORT_LOG_WINDOWS_H */
@@ -54,7 +54,8 @@ GPRAPI char *gpr_strdup(const char *src);
54
54
 
55
55
  On error, returns -1 and sets *strp to NULL. If the format string is bad,
56
56
  the result is undefined. */
57
- GPRAPI int gpr_asprintf(char **strp, const char *format, ...);
57
+ GPRAPI int gpr_asprintf(char **strp, const char *format, ...)
58
+ GPRC_PRINT_FORMAT_CHECK(2, 3);
58
59
 
59
60
  #ifdef __cplusplus
60
61
  }
@@ -31,9 +31,9 @@
31
31
  *
32
32
  */
33
33
 
34
- #ifndef GRPC_SUPPORT_ATM_WIN32_H
35
- #define GRPC_SUPPORT_ATM_WIN32_H
34
+ #ifndef GRPC_SUPPORT_SYNC_WINDOWS_H
35
+ #define GRPC_SUPPORT_SYNC_WINDOWS_H
36
36
 
37
- #include <grpc/impl/codegen/atm_win32.h>
37
+ #include <grpc/impl/codegen/sync_windows.h>
38
38
 
39
- #endif /* GRPC_SUPPORT_ATM_WIN32_H */
39
+ #endif /* GRPC_SUPPORT_SYNC_WINDOWS_H */
@@ -0,0 +1,179 @@
1
+ /*
2
+ *
3
+ * Copyright 2016, Google Inc.
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are
8
+ * met:
9
+ *
10
+ * * Redistributions of source code must retain the above copyright
11
+ * notice, this list of conditions and the following disclaimer.
12
+ * * Redistributions in binary form must reproduce the above
13
+ * copyright notice, this list of conditions and the following disclaimer
14
+ * in the documentation and/or other materials provided with the
15
+ * distribution.
16
+ * * Neither the name of Google Inc. nor the names of its
17
+ * contributors may be used to endorse or promote products derived from
18
+ * this software without specific prior written permission.
19
+ *
20
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ *
32
+ */
33
+ /* Automatically generated nanopb constant definitions */
34
+ /* Generated by nanopb-0.3.5-dev */
35
+
36
+ #include "src/core/ext/census/gen/census.pb.h"
37
+
38
+ #if PB_PROTO_HEADER_VERSION != 30
39
+ #error Regenerate this file with the current version of nanopb generator.
40
+ #endif
41
+
42
+
43
+
44
+ const pb_field_t google_census_Duration_fields[3] = {
45
+ PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, google_census_Duration, seconds, seconds, 0),
46
+ PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, google_census_Duration, nanos, seconds, 0),
47
+ PB_LAST_FIELD
48
+ };
49
+
50
+ const pb_field_t google_census_Timestamp_fields[3] = {
51
+ PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, google_census_Timestamp, seconds, seconds, 0),
52
+ PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, google_census_Timestamp, nanos, seconds, 0),
53
+ PB_LAST_FIELD
54
+ };
55
+
56
+ const pb_field_t google_census_Metric_fields[5] = {
57
+ PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Metric, name, name, 0),
58
+ PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Metric, description, name, 0),
59
+ PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, unit, description, &google_census_Metric_MeasurementUnit_fields),
60
+ PB_FIELD( 4, INT32 , OPTIONAL, STATIC , OTHER, google_census_Metric, id, unit, 0),
61
+ PB_LAST_FIELD
62
+ };
63
+
64
+ const pb_field_t google_census_Metric_BasicUnit_fields[2] = {
65
+ PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, google_census_Metric_BasicUnit, type, type, 0),
66
+ PB_LAST_FIELD
67
+ };
68
+
69
+ const pb_field_t google_census_Metric_MeasurementUnit_fields[4] = {
70
+ PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, google_census_Metric_MeasurementUnit, prefix, prefix, 0),
71
+ PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric_MeasurementUnit, numerator, prefix, &google_census_Metric_BasicUnit_fields),
72
+ PB_FIELD( 3, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric_MeasurementUnit, denominator, numerator, &google_census_Metric_BasicUnit_fields),
73
+ PB_LAST_FIELD
74
+ };
75
+
76
+ const pb_field_t google_census_AggregationDescriptor_fields[3] = {
77
+ PB_ONEOF_FIELD(options, 1, MESSAGE , ONEOF, STATIC , FIRST, google_census_AggregationDescriptor, bucket_boundaries, bucket_boundaries, &google_census_AggregationDescriptor_BucketBoundaries_fields),
78
+ PB_ONEOF_FIELD(options, 2, MESSAGE , ONEOF, STATIC , FIRST, google_census_AggregationDescriptor, interval_boundaries, interval_boundaries, &google_census_AggregationDescriptor_IntervalBoundaries_fields),
79
+ PB_LAST_FIELD
80
+ };
81
+
82
+ const pb_field_t google_census_AggregationDescriptor_BucketBoundaries_fields[2] = {
83
+ PB_FIELD( 1, DOUBLE , REPEATED, CALLBACK, FIRST, google_census_AggregationDescriptor_BucketBoundaries, bounds, bounds, 0),
84
+ PB_LAST_FIELD
85
+ };
86
+
87
+ const pb_field_t google_census_AggregationDescriptor_IntervalBoundaries_fields[2] = {
88
+ PB_FIELD( 1, DOUBLE , REPEATED, CALLBACK, FIRST, google_census_AggregationDescriptor_IntervalBoundaries, window_size, window_size, 0),
89
+ PB_LAST_FIELD
90
+ };
91
+
92
+ const pb_field_t google_census_Distribution_fields[5] = {
93
+ PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, google_census_Distribution, count, count, 0),
94
+ PB_FIELD( 2, DOUBLE , OPTIONAL, STATIC , OTHER, google_census_Distribution, mean, count, 0),
95
+ PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Distribution, range, mean, &google_census_Distribution_Range_fields),
96
+ PB_FIELD( 4, INT64 , REPEATED, CALLBACK, OTHER, google_census_Distribution, bucket_count, range, 0),
97
+ PB_LAST_FIELD
98
+ };
99
+
100
+ const pb_field_t google_census_Distribution_Range_fields[3] = {
101
+ PB_FIELD( 1, DOUBLE , OPTIONAL, STATIC , FIRST, google_census_Distribution_Range, min, min, 0),
102
+ PB_FIELD( 2, DOUBLE , OPTIONAL, STATIC , OTHER, google_census_Distribution_Range, max, min, 0),
103
+ PB_LAST_FIELD
104
+ };
105
+
106
+ const pb_field_t google_census_IntervalStats_fields[2] = {
107
+ PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_census_IntervalStats, window, window, &google_census_IntervalStats_Window_fields),
108
+ PB_LAST_FIELD
109
+ };
110
+
111
+ const pb_field_t google_census_IntervalStats_Window_fields[4] = {
112
+ PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, google_census_IntervalStats_Window, window_size, window_size, &google_census_Duration_fields),
113
+ PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, google_census_IntervalStats_Window, count, window_size, 0),
114
+ PB_FIELD( 3, DOUBLE , OPTIONAL, STATIC , OTHER, google_census_IntervalStats_Window, mean, count, 0),
115
+ PB_LAST_FIELD
116
+ };
117
+
118
+ const pb_field_t google_census_Tag_fields[3] = {
119
+ PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, google_census_Tag, key, key, 0),
120
+ PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, google_census_Tag, value, key, 0),
121
+ PB_LAST_FIELD
122
+ };
123
+
124
+ const pb_field_t google_census_View_fields[6] = {
125
+ PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_View, name, name, 0),
126
+ PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_View, description, name, 0),
127
+ PB_FIELD( 3, INT32 , OPTIONAL, STATIC , OTHER, google_census_View, metric_id, description, 0),
128
+ PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_View, aggregation, metric_id, &google_census_AggregationDescriptor_fields),
129
+ PB_FIELD( 5, STRING , REPEATED, CALLBACK, OTHER, google_census_View, tag_key, aggregation, 0),
130
+ PB_LAST_FIELD
131
+ };
132
+
133
+ const pb_field_t google_census_Aggregation_fields[6] = {
134
+ PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Aggregation, name, name, 0),
135
+ PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Aggregation, description, name, 0),
136
+ PB_ONEOF_FIELD(data, 3, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, distribution, description, &google_census_Distribution_fields),
137
+ PB_ONEOF_FIELD(data, 4, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, interval_stats, description, &google_census_IntervalStats_fields),
138
+ PB_FIELD( 5, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Aggregation, tag, data.interval_stats, &google_census_Tag_fields),
139
+ PB_LAST_FIELD
140
+ };
141
+
142
+ const pb_field_t google_census_ViewAggregations_fields[4] = {
143
+ PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_census_ViewAggregations, aggregation, aggregation, &google_census_Aggregation_fields),
144
+ PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_ViewAggregations, start, aggregation, &google_census_Timestamp_fields),
145
+ PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_ViewAggregations, end, start, &google_census_Timestamp_fields),
146
+ PB_LAST_FIELD
147
+ };
148
+
149
+
150
+ /* Check that field information fits in pb_field_t */
151
+ #if !defined(PB_FIELD_32BIT)
152
+ /* If you get an error here, it means that you need to define PB_FIELD_32BIT
153
+ * compile-time option. You can do that in pb.h or on compiler command line.
154
+ *
155
+ * The reason you need to do this is that some of your messages contain tag
156
+ * numbers or field sizes that are larger than what can fit in 8 or 16 bit
157
+ * field descriptors.
158
+ */
159
+ PB_STATIC_ASSERT((pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Aggregation, tag) < 65536 && pb_membersize(google_census_ViewAggregations, aggregation) < 65536 && pb_membersize(google_census_ViewAggregations, start) < 65536 && pb_membersize(google_census_ViewAggregations, end) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Metric_google_census_Metric_BasicUnit_google_census_Metric_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_ViewAggregations)
160
+ #endif
161
+
162
+ #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
163
+ /* If you get an error here, it means that you need to define PB_FIELD_16BIT
164
+ * compile-time option. You can do that in pb.h or on compiler command line.
165
+ *
166
+ * The reason you need to do this is that some of your messages contain tag
167
+ * numbers or field sizes that are larger than what can fit in the default
168
+ * 8 bit descriptors.
169
+ */
170
+ PB_STATIC_ASSERT((pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Aggregation, tag) < 256 && pb_membersize(google_census_ViewAggregations, aggregation) < 256 && pb_membersize(google_census_ViewAggregations, start) < 256 && pb_membersize(google_census_ViewAggregations, end) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Metric_google_census_Metric_BasicUnit_google_census_Metric_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_ViewAggregations)
171
+ #endif
172
+
173
+
174
+ /* On some platforms (such as AVR), double is really float.
175
+ * These are not directly supported by nanopb, but see example_avr_double.
176
+ * To get rid of this error, remove any double fields from your .proto.
177
+ */
178
+ PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)
179
+
@@ -0,0 +1,294 @@
1
+ /*
2
+ *
3
+ * Copyright 2016, Google Inc.
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are
8
+ * met:
9
+ *
10
+ * * Redistributions of source code must retain the above copyright
11
+ * notice, this list of conditions and the following disclaimer.
12
+ * * Redistributions in binary form must reproduce the above
13
+ * copyright notice, this list of conditions and the following disclaimer
14
+ * in the documentation and/or other materials provided with the
15
+ * distribution.
16
+ * * Neither the name of Google Inc. nor the names of its
17
+ * contributors may be used to endorse or promote products derived from
18
+ * this software without specific prior written permission.
19
+ *
20
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ *
32
+ */
33
+ /* Automatically generated nanopb header */
34
+ /* Generated by nanopb-0.3.5-dev */
35
+
36
+ #ifndef GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H
37
+ #define GRPC_CORE_EXT_CENSUS_GEN_CENSUS_PB_H
38
+ #include "third_party/nanopb/pb.h"
39
+ #if PB_PROTO_HEADER_VERSION != 30
40
+ #error Regenerate this file with the current version of nanopb generator.
41
+ #endif
42
+
43
+ #ifdef __cplusplus
44
+ extern "C" {
45
+ #endif
46
+
47
+ /* Enum definitions */
48
+ typedef enum _google_census_Metric_BasicUnit_Measure {
49
+ google_census_Metric_BasicUnit_Measure_UNKNOWN = 0,
50
+ google_census_Metric_BasicUnit_Measure_BITS = 1,
51
+ google_census_Metric_BasicUnit_Measure_BYTES = 2,
52
+ google_census_Metric_BasicUnit_Measure_SECS = 3,
53
+ google_census_Metric_BasicUnit_Measure_CORES = 4,
54
+ google_census_Metric_BasicUnit_Measure_MAX_UNITS = 5
55
+ } google_census_Metric_BasicUnit_Measure;
56
+
57
+ /* Struct definitions */
58
+ typedef struct _google_census_AggregationDescriptor_BucketBoundaries {
59
+ pb_callback_t bounds;
60
+ } google_census_AggregationDescriptor_BucketBoundaries;
61
+
62
+ typedef struct _google_census_AggregationDescriptor_IntervalBoundaries {
63
+ pb_callback_t window_size;
64
+ } google_census_AggregationDescriptor_IntervalBoundaries;
65
+
66
+ typedef struct _google_census_IntervalStats {
67
+ pb_callback_t window;
68
+ } google_census_IntervalStats;
69
+
70
+ typedef struct _google_census_AggregationDescriptor {
71
+ pb_size_t which_options;
72
+ union {
73
+ google_census_AggregationDescriptor_BucketBoundaries bucket_boundaries;
74
+ google_census_AggregationDescriptor_IntervalBoundaries interval_boundaries;
75
+ } options;
76
+ } google_census_AggregationDescriptor;
77
+
78
+ typedef struct _google_census_Distribution_Range {
79
+ bool has_min;
80
+ double min;
81
+ bool has_max;
82
+ double max;
83
+ } google_census_Distribution_Range;
84
+
85
+ typedef struct _google_census_Duration {
86
+ bool has_seconds;
87
+ int64_t seconds;
88
+ bool has_nanos;
89
+ int32_t nanos;
90
+ } google_census_Duration;
91
+
92
+ typedef struct _google_census_Metric_BasicUnit {
93
+ bool has_type;
94
+ google_census_Metric_BasicUnit_Measure type;
95
+ } google_census_Metric_BasicUnit;
96
+
97
+ typedef struct _google_census_Metric_MeasurementUnit {
98
+ bool has_prefix;
99
+ int32_t prefix;
100
+ pb_callback_t numerator;
101
+ pb_callback_t denominator;
102
+ } google_census_Metric_MeasurementUnit;
103
+
104
+ typedef struct _google_census_Tag {
105
+ bool has_key;
106
+ char key[255];
107
+ bool has_value;
108
+ char value[255];
109
+ } google_census_Tag;
110
+
111
+ typedef struct _google_census_Timestamp {
112
+ bool has_seconds;
113
+ int64_t seconds;
114
+ bool has_nanos;
115
+ int32_t nanos;
116
+ } google_census_Timestamp;
117
+
118
+ typedef struct _google_census_Distribution {
119
+ bool has_count;
120
+ int64_t count;
121
+ bool has_mean;
122
+ double mean;
123
+ bool has_range;
124
+ google_census_Distribution_Range range;
125
+ pb_callback_t bucket_count;
126
+ } google_census_Distribution;
127
+
128
+ typedef struct _google_census_IntervalStats_Window {
129
+ bool has_window_size;
130
+ google_census_Duration window_size;
131
+ bool has_count;
132
+ int64_t count;
133
+ bool has_mean;
134
+ double mean;
135
+ } google_census_IntervalStats_Window;
136
+
137
+ typedef struct _google_census_Metric {
138
+ pb_callback_t name;
139
+ pb_callback_t description;
140
+ bool has_unit;
141
+ google_census_Metric_MeasurementUnit unit;
142
+ bool has_id;
143
+ int32_t id;
144
+ } google_census_Metric;
145
+
146
+ typedef struct _google_census_View {
147
+ pb_callback_t name;
148
+ pb_callback_t description;
149
+ bool has_metric_id;
150
+ int32_t metric_id;
151
+ bool has_aggregation;
152
+ google_census_AggregationDescriptor aggregation;
153
+ pb_callback_t tag_key;
154
+ } google_census_View;
155
+
156
+ typedef struct _google_census_ViewAggregations {
157
+ pb_callback_t aggregation;
158
+ bool has_start;
159
+ google_census_Timestamp start;
160
+ bool has_end;
161
+ google_census_Timestamp end;
162
+ } google_census_ViewAggregations;
163
+
164
+ typedef struct _google_census_Aggregation {
165
+ pb_callback_t name;
166
+ pb_callback_t description;
167
+ pb_size_t which_data;
168
+ union {
169
+ google_census_Distribution distribution;
170
+ google_census_IntervalStats interval_stats;
171
+ } data;
172
+ pb_callback_t tag;
173
+ } google_census_Aggregation;
174
+
175
+ /* Default values for struct fields */
176
+
177
+ /* Initializer values for message structs */
178
+ #define google_census_Duration_init_default {false, 0, false, 0}
179
+ #define google_census_Timestamp_init_default {false, 0, false, 0}
180
+ #define google_census_Metric_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Metric_MeasurementUnit_init_default, false, 0}
181
+ #define google_census_Metric_BasicUnit_init_default {false, (google_census_Metric_BasicUnit_Measure)0}
182
+ #define google_census_Metric_MeasurementUnit_init_default {false, 0, {{NULL}, NULL}, {{NULL}, NULL}}
183
+ #define google_census_AggregationDescriptor_init_default {0, {google_census_AggregationDescriptor_BucketBoundaries_init_default}}
184
+ #define google_census_AggregationDescriptor_BucketBoundaries_init_default {{{NULL}, NULL}}
185
+ #define google_census_AggregationDescriptor_IntervalBoundaries_init_default {{{NULL}, NULL}}
186
+ #define google_census_Distribution_init_default {false, 0, false, 0, false, google_census_Distribution_Range_init_default, {{NULL}, NULL}}
187
+ #define google_census_Distribution_Range_init_default {false, 0, false, 0}
188
+ #define google_census_IntervalStats_init_default {{{NULL}, NULL}}
189
+ #define google_census_IntervalStats_Window_init_default {false, google_census_Duration_init_default, false, 0, false, 0}
190
+ #define google_census_Tag_init_default {false, "", false, ""}
191
+ #define google_census_View_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, 0, false, google_census_AggregationDescriptor_init_default, {{NULL}, NULL}}
192
+ #define google_census_Aggregation_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_default}, {{NULL}, NULL}}
193
+ #define google_census_ViewAggregations_init_default {{{NULL}, NULL}, false, google_census_Timestamp_init_default, false, google_census_Timestamp_init_default}
194
+ #define google_census_Duration_init_zero {false, 0, false, 0}
195
+ #define google_census_Timestamp_init_zero {false, 0, false, 0}
196
+ #define google_census_Metric_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Metric_MeasurementUnit_init_zero, false, 0}
197
+ #define google_census_Metric_BasicUnit_init_zero {false, (google_census_Metric_BasicUnit_Measure)0}
198
+ #define google_census_Metric_MeasurementUnit_init_zero {false, 0, {{NULL}, NULL}, {{NULL}, NULL}}
199
+ #define google_census_AggregationDescriptor_init_zero {0, {google_census_AggregationDescriptor_BucketBoundaries_init_zero}}
200
+ #define google_census_AggregationDescriptor_BucketBoundaries_init_zero {{{NULL}, NULL}}
201
+ #define google_census_AggregationDescriptor_IntervalBoundaries_init_zero {{{NULL}, NULL}}
202
+ #define google_census_Distribution_init_zero {false, 0, false, 0, false, google_census_Distribution_Range_init_zero, {{NULL}, NULL}}
203
+ #define google_census_Distribution_Range_init_zero {false, 0, false, 0}
204
+ #define google_census_IntervalStats_init_zero {{{NULL}, NULL}}
205
+ #define google_census_IntervalStats_Window_init_zero {false, google_census_Duration_init_zero, false, 0, false, 0}
206
+ #define google_census_Tag_init_zero {false, "", false, ""}
207
+ #define google_census_View_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, 0, false, google_census_AggregationDescriptor_init_zero, {{NULL}, NULL}}
208
+ #define google_census_Aggregation_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_zero}, {{NULL}, NULL}}
209
+ #define google_census_ViewAggregations_init_zero {{{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero}
210
+
211
+ /* Field tags (for use in manual encoding/decoding) */
212
+ #define google_census_AggregationDescriptor_BucketBoundaries_bounds_tag 1
213
+ #define google_census_AggregationDescriptor_IntervalBoundaries_window_size_tag 1
214
+ #define google_census_IntervalStats_window_tag 1
215
+ #define google_census_AggregationDescriptor_bucket_boundaries_tag 1
216
+
217
+ #define google_census_AggregationDescriptor_interval_boundaries_tag 2
218
+ #define google_census_Distribution_Range_min_tag 1
219
+ #define google_census_Distribution_Range_max_tag 2
220
+ #define google_census_Duration_seconds_tag 1
221
+ #define google_census_Duration_nanos_tag 2
222
+ #define google_census_Metric_BasicUnit_type_tag 1
223
+ #define google_census_Metric_MeasurementUnit_prefix_tag 1
224
+ #define google_census_Metric_MeasurementUnit_numerator_tag 2
225
+ #define google_census_Metric_MeasurementUnit_denominator_tag 3
226
+ #define google_census_Tag_key_tag 1
227
+ #define google_census_Tag_value_tag 2
228
+ #define google_census_Timestamp_seconds_tag 1
229
+ #define google_census_Timestamp_nanos_tag 2
230
+ #define google_census_Distribution_count_tag 1
231
+ #define google_census_Distribution_mean_tag 2
232
+ #define google_census_Distribution_range_tag 3
233
+ #define google_census_Distribution_bucket_count_tag 4
234
+ #define google_census_IntervalStats_Window_window_size_tag 1
235
+ #define google_census_IntervalStats_Window_count_tag 2
236
+ #define google_census_IntervalStats_Window_mean_tag 3
237
+ #define google_census_Metric_name_tag 1
238
+ #define google_census_Metric_description_tag 2
239
+ #define google_census_Metric_unit_tag 3
240
+ #define google_census_Metric_id_tag 4
241
+ #define google_census_View_name_tag 1
242
+ #define google_census_View_description_tag 2
243
+ #define google_census_View_metric_id_tag 3
244
+ #define google_census_View_aggregation_tag 4
245
+ #define google_census_View_tag_key_tag 5
246
+ #define google_census_ViewAggregations_aggregation_tag 1
247
+ #define google_census_ViewAggregations_start_tag 2
248
+ #define google_census_ViewAggregations_end_tag 3
249
+ #define google_census_Aggregation_distribution_tag 3
250
+
251
+ #define google_census_Aggregation_interval_stats_tag 4
252
+ #define google_census_Aggregation_name_tag 1
253
+ #define google_census_Aggregation_description_tag 2
254
+ #define google_census_Aggregation_tag_tag 5
255
+
256
+ /* Struct field encoding specification for nanopb */
257
+ extern const pb_field_t google_census_Duration_fields[3];
258
+ extern const pb_field_t google_census_Timestamp_fields[3];
259
+ extern const pb_field_t google_census_Metric_fields[5];
260
+ extern const pb_field_t google_census_Metric_BasicUnit_fields[2];
261
+ extern const pb_field_t google_census_Metric_MeasurementUnit_fields[4];
262
+ extern const pb_field_t google_census_AggregationDescriptor_fields[3];
263
+ extern const pb_field_t google_census_AggregationDescriptor_BucketBoundaries_fields[2];
264
+ extern const pb_field_t google_census_AggregationDescriptor_IntervalBoundaries_fields[2];
265
+ extern const pb_field_t google_census_Distribution_fields[5];
266
+ extern const pb_field_t google_census_Distribution_Range_fields[3];
267
+ extern const pb_field_t google_census_IntervalStats_fields[2];
268
+ extern const pb_field_t google_census_IntervalStats_Window_fields[4];
269
+ extern const pb_field_t google_census_Tag_fields[3];
270
+ extern const pb_field_t google_census_View_fields[6];
271
+ extern const pb_field_t google_census_Aggregation_fields[6];
272
+ extern const pb_field_t google_census_ViewAggregations_fields[4];
273
+
274
+ /* Maximum encoded size of messages (where known) */
275
+ #define google_census_Duration_size 22
276
+ #define google_census_Timestamp_size 22
277
+ #define google_census_Metric_BasicUnit_size 2
278
+ #define google_census_Distribution_Range_size 18
279
+ #define google_census_IntervalStats_Window_size 44
280
+ #define google_census_Tag_size 516
281
+
282
+ /* Message IDs (where set with "msgid" option) */
283
+ #ifdef PB_MSGID
284
+
285
+ #define CENSUS_MESSAGES \
286
+
287
+
288
+ #endif
289
+
290
+ #ifdef __cplusplus
291
+ } /* extern "C" */
292
+ #endif
293
+
294
+ #endif