diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-31 14:01:53 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-31 14:01:53 -0700 |
commit | 41dac846de147b42baf1da7535c236724ab576c6 (patch) | |
tree | 21f4fbc5d12e5efd03e75aac6ad560e75a805797 /src/core/lib/surface | |
parent | 44ad3fdf060b5826416a14cc7d723eae64bacd9f (diff) | |
parent | 02f5f8de36924b9fe55ccda800fa465b94bd181d (diff) |
Merge github.com:grpc/grpc into ignore_connectivity
Diffstat (limited to 'src/core/lib/surface')
29 files changed, 40 insertions, 35 deletions
diff --git a/src/core/lib/surface/alarm.c b/src/core/lib/surface/alarm.c index 368683378e..2cf2f00b31 100644 --- a/src/core/lib/surface/alarm.c +++ b/src/core/lib/surface/alarm.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/api_trace.c b/src/core/lib/surface/api_trace.c index 3702c024db..79e3e5ca9b 100644 --- a/src/core/lib/surface/api_trace.c +++ b/src/core/lib/surface/api_trace.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/api_trace.h b/src/core/lib/surface/api_trace.h index b50011c9e5..c60aaba5e9 100644 --- a/src/core/lib/surface/api_trace.h +++ b/src/core/lib/surface/api_trace.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.c index 03071ef92c..fb39c4531d 100644 --- a/src/core/lib/surface/byte_buffer.c +++ b/src/core/lib/surface/byte_buffer.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 7248f5fe71..809fd5f1fa 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 937963812f..ba94852f9a 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -174,6 +174,9 @@ struct grpc_call { /* Received call statuses from various sources */ received_status status[STATUS_SOURCE_COUNT]; + /* Call stats: only valid after trailing metadata received */ + grpc_transport_stream_stats stats; + /* Compression algorithm for the call */ grpc_compression_algorithm compression_algorithm; /* Supported encodings (compression algorithms), a bitset */ @@ -1384,6 +1387,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, bctl->recv_final_op = 1; stream_op.recv_trailing_metadata = &call->metadata_batch[1 /* is_receiving */][1 /* is_trailing */]; + stream_op.collect_stats = &call->stats; break; case GRPC_OP_RECV_CLOSE_ON_SERVER: /* Flag validation: currently allow no flags */ @@ -1405,6 +1409,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, bctl->recv_final_op = 1; stream_op.recv_trailing_metadata = &call->metadata_batch[1 /* is_receiving */][1 /* is_trailing */]; + stream_op.collect_stats = &call->stats; break; } } diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index e2e75865be..2725e060b8 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/call_details.c b/src/core/lib/surface/call_details.c index 08f606d84a..fe73da3f55 100644 --- a/src/core/lib/surface/call_details.c +++ b/src/core/lib/surface/call_details.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/call_log_batch.c b/src/core/lib/surface/call_log_batch.c index bc5a2ffb65..a6d1d5149f 100644 --- a/src/core/lib/surface/call_log_batch.c +++ b/src/core/lib/surface/call_log_batch.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/call_test_only.h b/src/core/lib/surface/call_test_only.h index 400214189e..47088991d3 100644 --- a/src/core/lib/surface/call_test_only.h +++ b/src/core/lib/surface/call_test_only.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index d815daa70c..06f991b085 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 09de0fccc9..640fd7e137 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/channel_connectivity.c b/src/core/lib/surface/channel_connectivity.c index 2f5d763e70..9a9ee422c2 100644 --- a/src/core/lib/surface/channel_connectivity.c +++ b/src/core/lib/surface/channel_connectivity.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/channel_ping.c b/src/core/lib/surface/channel_ping.c index dd862cdadd..5a50698695 100644 --- a/src/core/lib/surface/channel_ping.c +++ b/src/core/lib/surface/channel_ping.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/channel_stack_type.h b/src/core/lib/surface/channel_stack_type.h index 16608fa386..4eea4f1b01 100644 --- a/src/core/lib/surface/channel_stack_type.h +++ b/src/core/lib/surface/channel_stack_type.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index a0d7002053..5ec8808b50 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 35591cb6f4..eef82cf014 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/event_string.c b/src/core/lib/surface/event_string.c index 360c718a17..1abc6ebf8c 100644 --- a/src/core/lib/surface/event_string.c +++ b/src/core/lib/surface/event_string.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/event_string.h b/src/core/lib/surface/event_string.h index 577e9c718f..bc1464380d 100644 --- a/src/core/lib/surface/event_string.h +++ b/src/core/lib/surface/event_string.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index dbfc8a9336..566b030912 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,8 +48,6 @@ #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_client_filter.h" #include "src/core/lib/channel/http_server_filter.h" -#include "src/core/lib/client_config/lb_policies/pick_first.h" -#include "src/core/lib/client_config/lb_policies/round_robin.h" #include "src/core/lib/client_config/lb_policy_registry.h" #include "src/core/lib/client_config/resolver_registry.h" #include "src/core/lib/client_config/resolvers/dns_resolver.h" @@ -75,6 +73,9 @@ #define GRPC_DEFAULT_NAME_PREFIX "dns:///" #endif +/* (generated) built in registry of plugins */ +extern void grpc_register_built_in_plugins(void); + #define MAX_PLUGINS 128 static gpr_once g_basic_init = GPR_ONCE_INIT; @@ -83,6 +84,7 @@ static int g_initializations; static void do_basic_init(void) { gpr_mu_init(&g_init_mu); + grpc_register_built_in_plugins(); /* TODO(ctiller): ideally remove this strict linkage */ grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_destroy); g_initializations = 0; @@ -165,14 +167,12 @@ void grpc_init(void) { gpr_time_init(); grpc_mdctx_global_init(); grpc_channel_init_init(); - grpc_lb_policy_registry_init(grpc_pick_first_lb_factory_create()); - grpc_register_lb_policy(grpc_pick_first_lb_factory_create()); - grpc_register_lb_policy(grpc_round_robin_lb_factory_create()); + grpc_lb_policy_registry_init(); grpc_resolver_registry_init(GRPC_DEFAULT_NAME_PREFIX); grpc_register_resolver_type(grpc_dns_resolver_factory_create()); grpc_register_resolver_type(grpc_ipv4_resolver_factory_create()); grpc_register_resolver_type(grpc_ipv6_resolver_factory_create()); -#ifdef GPR_POSIX_SOCKET +#ifdef GPR_HAVE_UNIX_SOCKET grpc_register_resolver_type(grpc_unix_resolver_factory_create()); #endif grpc_register_tracer("api", &grpc_api_trace); diff --git a/src/core/lib/surface/init.h b/src/core/lib/surface/init.h index 10e2a5896e..b1bf57c10d 100644 --- a/src/core/lib/surface/init.h +++ b/src/core/lib/surface/init.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/init_secure.c b/src/core/lib/surface/init_secure.c index d3c2f645a7..3fda2c9e1e 100644 --- a/src/core/lib/surface/init_secure.c +++ b/src/core/lib/surface/init_secure.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/init_unsecure.c b/src/core/lib/surface/init_unsecure.c index 243c005d86..f952739e0a 100644 --- a/src/core/lib/surface/init_unsecure.c +++ b/src/core/lib/surface/init_unsecure.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index 95ec4b06c3..c1f6812c4e 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/metadata_array.c b/src/core/lib/surface/metadata_array.c index 4436f2da87..6c2b750e1d 100644 --- a/src/core/lib/surface/metadata_array.c +++ b/src/core/lib/surface/metadata_array.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 55e5e49e11..1898bee1c1 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h index 3845eb2981..470ef23c69 100644 --- a/src/core/lib/surface/server.h +++ b/src/core/lib/surface/server.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/surface_trace.h b/src/core/lib/surface/surface_trace.h index 6b3f673924..a69a0fff57 100644 --- a/src/core/lib/surface/surface_trace.h +++ b/src/core/lib/surface/surface_trace.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index 7723f39401..fe954cbefb 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without |