aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/grpc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpc/grpc.h')
-rw-r--r--include/grpc/grpc.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index c129a66949..348c7a316f 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -60,6 +60,8 @@ GRPCAPI void grpc_register_plugin(void (*init)(void), void (*destroy)(void));
/** Initialize the grpc library.
+ After it's called, a matching invocation to grpc_shutdown() is expected.
+
It is not safe to call any other grpc functions before calling this.
(To avoid overhead, little checking is done, and some things may work. We
do not warrant that they will continue to do so in future revisions of this
@@ -68,6 +70,9 @@ GRPCAPI void grpc_init(void);
/** Shut down the grpc library.
+ Before it's called, there should haven been a matching invocation to
+ grpc_init().
+
No memory is used by grpc after this call returns, nor are any instructions
executing within the grpc library.
Prior to calling, all application owned grpc objects must have been
@@ -269,6 +274,11 @@ GRPCAPI char* grpc_channel_get_target(grpc_channel* channel);
GRPCAPI void grpc_channel_get_info(grpc_channel* channel,
const grpc_channel_info* channel_info);
+/** EXPERIMENTAL. Resets the channel's connect backoff.
+ TODO(roth): When we see whether this proves useful, either promote
+ to non-experimental or remove it. */
+GRPCAPI void grpc_channel_reset_connect_backoff(grpc_channel* channel);
+
/** Create a client channel to 'target'. Additional channel level configuration
MAY be provided by grpc_channel_args, though the expectation is that most
clients will want to simply pass NULL. The user data in 'args' need only
@@ -454,6 +464,29 @@ GRPCAPI void grpc_resource_quota_resize(grpc_resource_quota* resource_quota,
*/
GRPCAPI const grpc_arg_pointer_vtable* grpc_resource_quota_arg_vtable(void);
+/************* CHANNELZ API *************/
+/** Channelz is under active development. The following APIs will see some
+ churn as the feature is implemented. This comment will be removed once
+ channelz is officially supported, and these APIs become stable. For now
+ you may track the progress by following this github issue:
+ https://github.com/grpc/grpc/issues/15340
+
+ the following APIs return allocated JSON strings that match the response
+ objects from the channelz proto, found here:
+ https://github.com/grpc/grpc/blob/master/src/proto/grpc/channelz/channelz.proto.
+
+ For easy conversion to protobuf, The JSON is formatted according to:
+ https://developers.google.com/protocol-buffers/docs/proto3#json. */
+
+/* Gets all root channels (i.e. channels the application has directly
+ created). This does not include subchannels nor non-top level channels.
+ The returned string is allocated and must be freed by the application. */
+GRPCAPI char* grpc_channelz_get_top_channels(intptr_t start_channel_id);
+
+/* Returns a single Channel, or else a NOT_FOUND code. The returned string
+ is allocated and must be freed by the application. */
+GRPCAPI char* grpc_channelz_get_channel(intptr_t channel_id);
+
#ifdef __cplusplus
}
#endif