clang-format

pull/6436/head
Julien Boeuf 9 years ago
parent bae6a4cb43
commit 19cd009ec1
  1. 12
      include/grpc++/impl/codegen/method_handler_impl.h
  2. 1
      src/core/lib/security/credentials/composite/composite_credentials.c
  3. 1
      src/core/lib/security/credentials/composite/composite_credentials.h
  4. 6
      src/core/lib/security/credentials/credentials.c
  5. 1
      src/core/lib/security/credentials/fake/fake_credentials.c
  6. 1
      src/core/lib/security/credentials/fake/fake_credentials.h
  7. 2
      src/core/lib/security/credentials/google_default/google_default_credentials.c
  8. 2
      src/core/lib/security/credentials/google_default/google_default_credentials.h
  9. 2
      src/core/lib/security/credentials/iam/iam_credentials.c
  10. 3
      src/core/lib/security/credentials/iam/iam_credentials.h
  11. 1
      src/core/lib/security/credentials/jwt/json_token.c
  12. 1
      src/core/lib/security/credentials/jwt/jwt_credentials.c
  13. 1
      src/core/lib/security/credentials/jwt/jwt_credentials.h
  14. 2
      src/core/lib/security/credentials/oauth2/oauth2_credentials.c
  15. 2
      src/core/lib/security/credentials/oauth2/oauth2_credentials.h
  16. 2
      src/core/lib/security/credentials/plugin/plugin_credentials.c
  17. 3
      src/core/lib/security/credentials/plugin/plugin_credentials.h
  18. 4
      src/core/lib/security/credentials/ssl/ssl_credentials.c
  19. 1
      src/core/lib/security/credentials/ssl/ssl_credentials.h
  20. 1
      src/core/lib/security/util/json_util.c
  21. 4
      src/core/lib/security/util/json_util.h
  22. 2
      test/core/security/jwt_verifier_test.c
  23. 2
      test/core/security/print_google_default_creds_token.c
  24. 12
      test/cpp/qps/client_async.cc
  25. 6
      test/cpp/qps/server_async.cc

@ -44,9 +44,9 @@ namespace grpc {
template <class ServiceType, class RequestType, class ResponseType>
class RpcMethodHandler : public MethodHandler {
public:
RpcMethodHandler(
std::function<Status(ServiceType*, ServerContext*, const RequestType*,
ResponseType*)> func,
RpcMethodHandler(std::function<Status(ServiceType*, ServerContext*,
const RequestType*, ResponseType*)>
func,
ServiceType* service)
: func_(func), service_(service) {}
@ -88,7 +88,8 @@ class ClientStreamingHandler : public MethodHandler {
public:
ClientStreamingHandler(
std::function<Status(ServiceType*, ServerContext*,
ServerReader<RequestType>*, ResponseType*)> func,
ServerReader<RequestType>*, ResponseType*)>
func,
ServiceType* service)
: func_(func), service_(service) {}
@ -124,7 +125,8 @@ class ServerStreamingHandler : public MethodHandler {
public:
ServerStreamingHandler(
std::function<Status(ServiceType*, ServerContext*, const RequestType*,
ServerWriter<ResponseType>*)> func,
ServerWriter<ResponseType>*)>
func,
ServiceType* service)
: func_(func), service_(service) {}

@ -260,4 +260,3 @@ grpc_channel_credentials *grpc_composite_channel_credentials_create(
c->call_creds = grpc_call_credentials_ref(call_creds);
return &c->base;
}

@ -69,4 +69,3 @@ typedef struct {
} grpc_composite_call_credentials;
#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H

@ -53,9 +53,8 @@
/* -- Common. -- */
grpc_credentials_metadata_request *
grpc_credentials_metadata_request_create(grpc_call_credentials *creds,
grpc_credentials_metadata_cb cb,
grpc_credentials_metadata_request *grpc_credentials_metadata_request_create(
grpc_call_credentials *creds, grpc_credentials_metadata_cb cb,
void *user_data) {
grpc_credentials_metadata_request *r =
gpr_malloc(sizeof(grpc_credentials_metadata_request));
@ -230,4 +229,3 @@ grpc_server_credentials *grpc_find_server_credentials_in_args(
}
return NULL;
}

@ -136,4 +136,3 @@ grpc_call_credentials *grpc_md_only_test_credentials_create(
c->is_async = is_async;
return &c->base;
}

@ -53,4 +53,3 @@ typedef struct {
} grpc_md_only_test_credentials;
#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H

@ -41,8 +41,8 @@
#include "src/core/lib/http/httpcli.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include "src/core/lib/security/credentials/jwt/jwt_credentials.h"
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include "src/core/lib/support/env.h"
#include "src/core/lib/support/load_file.h"
#include "src/core/lib/surface/api_trace.h"

@ -43,5 +43,3 @@
void grpc_flush_cached_google_default_credentials(void);
#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H

@ -83,5 +83,3 @@ grpc_call_credentials *grpc_google_iam_credentials_create(
c->iam_md, GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, authority_selector);
return &c->base;
}

@ -42,6 +42,3 @@ typedef struct {
} grpc_google_iam_credentials;
#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H

@ -318,4 +318,3 @@ void grpc_jwt_encode_and_sign_set_override(
grpc_jwt_encode_and_sign_override func) {
g_jwt_encode_and_sign_override = func;
}

@ -158,4 +158,3 @@ grpc_call_credentials *grpc_service_account_jwt_access_credentials_create(
return grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
grpc_auth_json_key_create_from_string(json_key), token_lifetime);
}

@ -60,4 +60,3 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
grpc_auth_json_key key, gpr_timespec token_lifetime);
#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H

@ -426,5 +426,3 @@ grpc_call_credentials *grpc_access_token_credentials_create(
gpr_free(token_md_value);
return &c->base;
}

@ -82,7 +82,6 @@ typedef struct {
grpc_fetch_oauth2_func fetch_func;
} grpc_oauth2_token_fetcher_credentials;
// Google refresh token credentials.
typedef struct {
grpc_oauth2_token_fetcher_credentials base;
@ -108,4 +107,3 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response(
grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime);
#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H

@ -127,5 +127,3 @@ grpc_call_credentials *grpc_metadata_credentials_create_from_plugin(
c->plugin = plugin;
return &c->base;
}

@ -43,6 +43,3 @@ typedef struct {
} grpc_plugin_credentials;
#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H

@ -160,7 +160,6 @@ static void ssl_server_destruct(grpc_server_credentials *creds) {
if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs);
}
static grpc_security_status ssl_server_create_security_connector(
grpc_server_credentials *creds, grpc_server_security_connector **sc) {
grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)creds;
@ -170,7 +169,6 @@ static grpc_security_status ssl_server_create_security_connector(
static grpc_server_credentials_vtable ssl_server_vtable = {
ssl_server_destruct, ssl_server_create_security_connector};
static void ssl_build_server_config(
const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs,
size_t num_key_cert_pairs,
@ -206,7 +204,6 @@ static void ssl_build_server_config(
}
}
grpc_server_credentials *grpc_ssl_server_credentials_create(
const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs,
size_t num_key_cert_pairs, int force_client_auth, void *reserved) {
@ -241,4 +238,3 @@ grpc_server_credentials *grpc_ssl_server_credentials_create_ex(
&c->config);
return &c->base;
}

@ -46,4 +46,3 @@ typedef struct {
} grpc_ssl_server_credentials;
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H */

@ -59,4 +59,3 @@ bool grpc_copy_json_string_property(const grpc_json *json,
*copied_value = gpr_strdup(prop_value);
return true;
}

@ -50,8 +50,6 @@ const char *grpc_json_get_string_property(const grpc_json *json,
// Copies the value of the json child property specified by prop_name.
// Returns false if the property was not found.
bool grpc_copy_json_string_property(const grpc_json *json,
const char *prop_name,
char **copied_value);
const char *prop_name, char **copied_value);
#endif // GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H

@ -43,8 +43,8 @@
#include <grpc/support/string_util.h>
#include "src/core/lib/http/httpcli.h"
#include "src/core/lib/security/util/b64.h"
#include "src/core/lib/security/credentials/jwt/json_token.h"
#include "src/core/lib/security/util/b64.h"
#include "test/core/util/test_config.h"
/* This JSON key was generated with the GCE console and revoked immediately.

@ -42,8 +42,8 @@
#include <grpc/support/slice.h>
#include <grpc/support/sync.h>
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/composite/composite_credentials.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/support/string.h"
typedef struct {

@ -84,7 +84,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext {
std::function<
std::unique_ptr<grpc::ClientAsyncResponseReader<ResponseType>>(
BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&,
CompletionQueue*)> start_req,
CompletionQueue*)>
start_req,
std::function<void(grpc::Status, ResponseType*)> on_done)
: context_(),
stub_(stub),
@ -165,7 +166,8 @@ class AsyncClient : public ClientImpl<StubType, RequestType> {
AsyncClient(const ClientConfig& config,
std::function<ClientRpcContext*(
StubType*, std::function<gpr_timespec()> next_issue,
const RequestType&)> setup_ctx,
const RequestType&)>
setup_ctx,
std::function<std::unique_ptr<StubType>(std::shared_ptr<Channel>)>
create_stub)
: ClientImpl<StubType, RequestType>(config, create_stub),
@ -278,7 +280,8 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext {
std::function<std::unique_ptr<
grpc::ClientAsyncReaderWriter<RequestType, ResponseType>>(
BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*,
void*)> start_req,
void*)>
start_req,
std::function<void(grpc::Status, ResponseType*)> on_done)
: context_(),
stub_(stub),
@ -405,7 +408,8 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext {
std::function<gpr_timespec()> next_issue,
std::function<std::unique_ptr<grpc::GenericClientAsyncReaderWriter>(
grpc::GenericStub*, grpc::ClientContext*,
const grpc::string& method_name, CompletionQueue*, void*)> start_req,
const grpc::string& method_name, CompletionQueue*, void*)>
start_req,
std::function<void(grpc::Status, ByteBuffer*)> on_done)
: context_(),
stub_(stub),

@ -73,7 +73,8 @@ class AsyncQpsServerTest : public Server {
CompletionQueue *, ServerCompletionQueue *, void *)>
request_streaming_function,
std::function<grpc::Status(const PayloadConfig &, const RequestType *,
ResponseType *)> process_rpc)
ResponseType *)>
process_rpc)
: Server(config) {
char *server_address = NULL;
@ -190,7 +191,8 @@ class AsyncQpsServerTest : public Server {
ServerRpcContextUnaryImpl(
std::function<void(ServerContextType *, RequestType *,
grpc::ServerAsyncResponseWriter<ResponseType> *,
void *)> request_method,
void *)>
request_method,
std::function<grpc::Status(const RequestType *, ResponseType *)>
invoke_method)
: srv_ctx_(new ServerContextType),

Loading…
Cancel
Save