mirror of https://github.com/grpc/grpc.git
commit
203860ac23
1802 changed files with 63657 additions and 30320 deletions
@ -0,0 +1,150 @@ |
||||
# Overview |
||||
|
||||
gRPC-Web provides a JS client library that supports the same API |
||||
as gRPC-Node to access a gRPC service. Due to browser limitation, |
||||
the Web client library implements a different protocol than the |
||||
[native gRPC protocol](http://www.grpc.io/docs/guides/wire.html). |
||||
This protocol is designed to make it easy for a proxy to translate |
||||
between the protocols as this is the most likely deployment model. |
||||
|
||||
This document lists the differences between the two protocols. |
||||
To help tracking future revisions, this document describes a delta |
||||
with the protocol details specified in the |
||||
[native gRPC protocol](http://www.grpc.io/docs/guides/wire.html). |
||||
|
||||
# Design goals |
||||
|
||||
For the gRPC-Web protocol, we have decided on the following design goals: |
||||
|
||||
* adopt the same framing as “application/grpc” whenever possible |
||||
* decouple from HTTP/2 framing which is not, and will never, be directly |
||||
exposed by browsers |
||||
* support text streams (e.g. base64) in order to provide cross-browser |
||||
support (e.g. IE-10) |
||||
|
||||
While the new protocol will be published/reviewed publicly, we also |
||||
intend to keep the protocol as an internal detail to gRPC-Web. |
||||
More specifically, we expect the protocol to |
||||
|
||||
* evolve over time, mainly to optimize for browser clients or support |
||||
web-specific features such as CORS, XSRF |
||||
* become optional (in 1-2 years) when browsers are able to speak the native |
||||
gRPC protocol via the new [whatwg fetch/streams API](https://github.com/whatwg/fetch) |
||||
|
||||
# Protocol differences vs [gRPC over HTTP2](http://www.grpc.io/docs/guides/wire.html) |
||||
|
||||
Content-Type |
||||
|
||||
1. application/grpc-web |
||||
* e.g. application/grpc-web+[proto, json, thrift] |
||||
2. application/grpc-web-text |
||||
* text-encoded streams of “application/grpc-web” |
||||
|
||||
--- |
||||
|
||||
HTTP wire protocols |
||||
|
||||
1. support any HTTP/*, with no dependency on HTTP/2 specific framing |
||||
2. use lower-case header/trailer names |
||||
3. use EOF (end of body) to close the stream |
||||
|
||||
--- |
||||
|
||||
HTTP/2 related behavior (specified in [gRPC over HTTP2](http://www.grpc.io/docs/guides/wire.html)) |
||||
|
||||
1. stream-id is not supported or used |
||||
2. go-away is not supported or used |
||||
|
||||
--- |
||||
|
||||
Message framing (vs. [http2-transport-mapping](http://www.grpc.io/docs/guides/wire.html#http2-transport-mapping)) |
||||
|
||||
1. Response status encoded as part of the response body |
||||
* Key-value pairs encoded in the HTTP/2 [literal header format](https://tools.ietf.org/html/rfc7541#section-6.2) as a single header block. |
||||
2. 8th (MSB) bit of the 1st gRPC frame byte |
||||
* 0: data |
||||
* 1: trailers |
||||
3. Trailers must be the last message of the response, as enforced |
||||
by the implementation |
||||
4. Trailers-only responses: no change to the gRPC protocol spec. |
||||
Trailers will be sent together with response headers, with no message |
||||
in the body. |
||||
|
||||
--- |
||||
|
||||
User Agent |
||||
|
||||
* grpc-web-javascript/0.1 |
||||
|
||||
--- |
||||
|
||||
Text-encoded (response) streams |
||||
|
||||
1. The client library should indicate to the server via the "Accept" header that |
||||
the response stream needs to be text encoded e.g. when XHR is used or due |
||||
to security policies with XHR |
||||
* Accept: application/grpc-web-text |
||||
2. The default text encoding is base64 |
||||
* Text encoding may be specified with Content-Type or Accept headers as |
||||
* application/grpc-web-text-base64 |
||||
* Note that “Content-Transfer-Encoding: base64” should not be used. |
||||
Due to in-stream base64 padding when delimiting messages, the entire |
||||
response body is not necessarily a valid base64-encoded entity |
||||
* While the server runtime will always base64-encode and flush gRPC messages |
||||
atomically the client library should not assume base64 padding always |
||||
happens at the boundary of message frames. |
||||
3. For binary trailers, when the content-type is set to |
||||
application/grpc-web-text, the extra base64 encoding specified |
||||
in [gRPC over HTTP2](http://www.grpc.io/docs/guides/wire.html) |
||||
for binary custom metadata is skipped. |
||||
|
||||
# Other features |
||||
|
||||
Compression |
||||
|
||||
* Full-body compression is supported and expected for all unary |
||||
requests/responses. The compression/decompression will be done |
||||
by browsers, using standard Content-Encoding headers |
||||
* “grpc-encoding” header is not used |
||||
* SDCH, Brotli will be supported |
||||
* Message-level compression for streamed requests/responses is not supported |
||||
because manual compression/decompression is prohibitively expensive using JS |
||||
* Per-message compression may be feasible in future with wasm |
||||
|
||||
--- |
||||
|
||||
Retries, caching |
||||
|
||||
* Will spec out the support after their respective gRPC spec extensions |
||||
are finalized |
||||
* Safe retries: PUT |
||||
* Caching: header encoded request and/or a web specific spec |
||||
|
||||
--- |
||||
|
||||
Security |
||||
|
||||
* XSRF, XSS etc to be specified |
||||
|
||||
--- |
||||
|
||||
CORS preflight |
||||
|
||||
* The client library may support header overwrites to avoid preflight |
||||
* https://github.com/whatwg/fetch/issues/210 |
||||
* CSP support to be specified |
||||
|
||||
--- |
||||
|
||||
Keep-alive |
||||
|
||||
* HTTP/2 PING is not supported or used |
||||
* Will not support send-beacon (GET) |
||||
|
||||
--- |
||||
|
||||
Bidi-streaming, with flow-control |
||||
|
||||
* Pending on [whatwg fetch/streams](https://github.com/whatwg/fetch) to be |
||||
finalized and implemented in modern browsers |
||||
* gRPC-Web client will support the native gRPC protocol with modern browsers |
After Width: | Height: | Size: 62 KiB |
@ -0,0 +1,194 @@ |
||||
Negative HTTP/2 Interop Test Case Descriptions |
||||
======================================= |
||||
|
||||
Client and server use |
||||
[test.proto](../src/proto/grpc/testing/test.proto). |
||||
|
||||
Server |
||||
------ |
||||
The code for the custom http2 server can be found |
||||
[here](https://github.com/grpc/grpc/tree/master/test/http2_test). |
||||
It is responsible for handling requests and sending responses, and also for |
||||
fulfilling the behavior of each particular test case. |
||||
|
||||
Server should accept these arguments: |
||||
* --port=PORT |
||||
* The port the server will run on. For example, "8080" |
||||
* --test_case=TESTCASE |
||||
* The name of the test case to execute. For example, "goaway" |
||||
|
||||
Client |
||||
------ |
||||
|
||||
Clients implement test cases that test certain functionality. Each client is |
||||
provided the test case it is expected to run as a command-line parameter. Names |
||||
should be lowercase and without spaces. |
||||
|
||||
Clients should accept these arguments: |
||||
* --server_host=HOSTNAME |
||||
* The server host to connect to. For example, "localhost" or "127.0.0.1" |
||||
* --server_port=PORT |
||||
* The server port to connect to. For example, "8080" |
||||
* --test_case=TESTCASE |
||||
* The name of the test case to execute. For example, "goaway" |
||||
|
||||
Note |
||||
----- |
||||
|
||||
Note that the server and client must be invoked with the same test case or else |
||||
the test will be meaningless. For convenience, we provide a shell script wrapper |
||||
that invokes both server and client at the same time, with the same test_case. |
||||
This is the preferred way to run these tests. |
||||
|
||||
## Test Cases |
||||
|
||||
### goaway |
||||
|
||||
This test verifies that the client correctly responds to a goaway sent by the |
||||
server. The client should handle the goaway by switching to a new stream without |
||||
the user application having to do a thing. |
||||
|
||||
Client Procedure: |
||||
1. Client sends two UnaryCall requests with: |
||||
|
||||
``` |
||||
{ |
||||
response_size: 314159 |
||||
payload:{ |
||||
body: 271828 bytes of zeros |
||||
} |
||||
} |
||||
``` |
||||
|
||||
Client asserts: |
||||
* Call was successful. |
||||
* Response payload body is 314159 bytes in size. |
||||
|
||||
Server Procedure: |
||||
1. Server sends a GOAWAY after receiving the first UnaryCall. |
||||
|
||||
Server asserts: |
||||
* The second UnaryCall has a different stream_id than the first one. |
||||
|
||||
### rst_after_header |
||||
|
||||
This test verifies that the client fails correctly when the server sends a |
||||
RST_STREAM immediately after sending headers to the client. |
||||
|
||||
Procedure: |
||||
1. Client sends UnaryCall with: |
||||
|
||||
``` |
||||
{ |
||||
response_size: 314159 |
||||
payload:{ |
||||
body: 271828 bytes of zeros |
||||
} |
||||
} |
||||
``` |
||||
|
||||
Client asserts: |
||||
* Call was not successful. |
||||
|
||||
Server Procedure: |
||||
1. Server sends a RST_STREAM with error code 0 after sending headers to the client. |
||||
|
||||
*At the moment the error code and message returned are not standardized throughout all |
||||
languages. Those checks will be added once all client languages behave the same way. [#9142](https://github.com/grpc/grpc/issues/9142) is in flight.* |
||||
|
||||
### rst_during_data |
||||
|
||||
This test verifies that the client fails "correctly" when the server sends a |
||||
RST_STREAM halfway through sending data to the client. |
||||
|
||||
Procedure: |
||||
1. Client sends UnaryCall with: |
||||
|
||||
``` |
||||
{ |
||||
response_size: 314159 |
||||
payload:{ |
||||
body: 271828 bytes of zeros |
||||
} |
||||
} |
||||
``` |
||||
|
||||
Client asserts: |
||||
* Call was not successful. |
||||
|
||||
Server Procedure: |
||||
1. Server sends a RST_STREAM with error code 0 after sending half of |
||||
the requested data to the client. |
||||
|
||||
### rst_after_data |
||||
|
||||
This test verifies that the client fails "correctly" when the server sends a |
||||
RST_STREAM after sending all of the data to the client. |
||||
|
||||
Procedure: |
||||
1. Client sends UnaryCall with: |
||||
|
||||
``` |
||||
{ |
||||
response_size: 314159 |
||||
payload:{ |
||||
body: 271828 bytes of zeros |
||||
} |
||||
} |
||||
``` |
||||
|
||||
Client asserts: |
||||
* Call was not successful. |
||||
|
||||
Server Procedure: |
||||
1. Server sends a RST_STREAM with error code 0 after sending all of the |
||||
data to the client. |
||||
|
||||
*Certain client languages allow the data to be accessed even though a RST_STREAM |
||||
was encountered. Once all client languages behave this way, checks will be added on |
||||
the incoming data.* |
||||
|
||||
### ping |
||||
|
||||
This test verifies that the client correctly acknowledges all pings it gets from the |
||||
server. |
||||
|
||||
Procedure: |
||||
1. Client sends UnaryCall with: |
||||
|
||||
``` |
||||
{ |
||||
response_size: 314159 |
||||
payload:{ |
||||
body: 271828 bytes of zeros |
||||
} |
||||
} |
||||
``` |
||||
|
||||
Client asserts: |
||||
* call was successful. |
||||
* response payload body is 314159 bytes in size. |
||||
|
||||
Server Procedure: |
||||
1. Server tracks the number of outstanding pings (i.e. +1 when it sends a ping, and -1 |
||||
when it receives an ack from the client). |
||||
2. Server sends pings before and after sending headers, also before and after sending data. |
||||
|
||||
Server Asserts: |
||||
* Number of outstanding pings is 0 when the connection is lost. |
||||
|
||||
### max_streams |
||||
|
||||
This test verifies that the client observes the MAX_CONCURRENT_STREAMS limit set by the server. |
||||
|
||||
Client Procedure: |
||||
1. Client sends initial UnaryCall to allow the server to update its MAX_CONCURRENT_STREAMS settings. |
||||
2. Client concurrently sends 10 UnaryCalls. |
||||
|
||||
Client Asserts: |
||||
* All UnaryCalls were successful, and had the correct type and payload size. |
||||
|
||||
Server Procedure: |
||||
1. Sets MAX_CONCURRENT_STREAMS to one after the connection is made. |
||||
|
||||
*The assertion that the MAX_CONCURRENT_STREAMS limit is upheld occurs in the http2 library we used.* |
@ -0,0 +1,92 @@ |
||||
# Stress Test framework for gRPC |
||||
|
||||
(Sree Kuchibhotla - sreek@) |
||||
|
||||
> Status: This is implemented. More details at [README.md](https://github.com/grpc/grpc/blob/master/tools/run_tests/stress_test/README.md) |
||||
|
||||
|
||||
**I. GOALS** |
||||
|
||||
1) Build a stress test suite for gRPC: |
||||
|
||||
* Build a stress test suite that can Identify bugs by testing the system (gRPC server/client) under extreme conditions: |
||||
* High load |
||||
* High concurrency |
||||
* Limited resources |
||||
* Intermittent failures |
||||
* Should be integrated with Jenkins CI |
||||
|
||||
2) Make it generic enough (i.e build a generic test framework) that can be used for: |
||||
|
||||
* Executing M instances of a client against N instances of a server with an arbitrarily defined connection matrix |
||||
* Execute heterogenous test configurations - for example: Java stress test clients against C++ servers or Node clients against Python servers or TSAN C++ clients vs ASAN C++ Servers etc. |
||||
* Easy and Flexible enough that Devs can use it to recreate complex test scenarios |
||||
|
||||
The implementation effort is divided into two parts: |
||||
|
||||
* Building a "Stress Test Framework" to run the stress test suites- More details in **Section II** (The idea is that the Stress Test framework is generic enough that it would be easier to modify it to run other suites like interop-tests or custom test scenarios) |
||||
* Building a 'Stress test suite' - More details in **section III** |
||||
|
||||
**Terminology:** |
||||
|
||||
GCE - Google compute engine |
||||
GKE - Google Container engine |
||||
Kubernetes - Google's open source service scheduler / orchestrator. |
||||
|
||||
**Note:** The terms GKE and Kubernetes are used interchangeably in this document |
||||
|
||||
# II. STRESS TEST FRAMEWORK |
||||
|
||||
(The details of each step are explained below)) |
||||
![image](images/stress_test_framework.png) |
||||
**Figure 1** |
||||
|
||||
### Step 1 Read the test config, generate base docker images |
||||
|
||||
**_Test Config:_** The test configuration contains the following information: |
||||
|
||||
* _GKE info:_ GKE project and cluster info |
||||
* _Docker images:_ Instructions to build docker images |
||||
* _Client templates:_ One or more client templates each containing the following information: |
||||
* Which docker image to use |
||||
* Path to the client program to launch (within the docker image) |
||||
* Parameters to the client program |
||||
* _Server templates:_ Similar to Client templates - except that these are for servers |
||||
* Test matrix containing the following: |
||||
* _Server groups:_ One or more groups of servers containing the following info for each group |
||||
* Which server template to use |
||||
* How many instances to launch |
||||
* _Client groups:_ One or more groups of clients containing the following (for each group): |
||||
* Which client template to use |
||||
* How many instances to launch |
||||
* Which server group to talk to (all clients in this group will talk to all servers in the server group) |
||||
|
||||
The first step is to read the test config and build the docker images |
||||
|
||||
**_Stress server docker image:_** The following are the main files in the server docker images |
||||
|
||||
* _Interop_server:_ The server program |
||||
* `run_server.py`: This is a python script which is the entry point of the docker image (i.e this is the script that is called when the docker image is run in GKE). This script launches the interop server and also updates the status in BigQuery. If the interop_server fails for whatever reason, the script launch_server.py logs that status in BigQuery |
||||
|
||||
**_Stress client docker image:_** |
||||
|
||||
* Stress client: The stress test client. In addition to talking to the interop_server, the stress client also exports metrics (which can be queried by the metrics_client described below) |
||||
* Metrics client: Metrics client connects to the stress_client to get the current qps metrics. |
||||
* `run_client.py`: This is a python script which is the entry point of the docker image (i.e this is the script that is called when the docker image is run in GKE). This script launches the stress client and also updates the status in BigQuery. The script then periodically launches metrics client to query the qps from the stress client and then uploads the qps to BigQuery. |
||||
|
||||
### Step 2) Upload the docker images to GKE |
||||
The docker images are uploaded to the GKE registry |
||||
|
||||
### Step 3) Launch the tests in GKE |
||||
The test driver reads the test matrix (described in step 1) and creates the necessary server and client pods in GKE. |
||||
|
||||
### Step 4) Tests are run in GKE |
||||
GKE starts running the tests by calling the entry points in *each* docker image (i.e `run_server.py` or `run_client.py` depending on whcih docker image it is) |
||||
|
||||
### Step 5) Upload the status to GKE and Monitor the status in GKE |
||||
* 5.1 The tests periodically update their status in BigQuery |
||||
* 5.2 The test driver periodically checks the status in Bigquery to see if any tests failed. If any tests failed, the driver immediately stops the tests. If not, the driver continues to run the tests for a configurable amount of time. |
||||
|
||||
### Step 6) Create a summary report |
||||
The test driver creates a final summary report containing details about any test failures and information about how to connect the failed pods in GKE for debugging. |
||||
|
@ -1,188 +0,0 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
|
||||
// Generated by tools/codegen/extensions/gen_reflection_proto.sh
|
||||
// If you make any local change, they will be lost.
|
||||
// source: reflection.proto
|
||||
// Original file comments:
|
||||
// Copyright 2016, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
// Service exported by server reflection
|
||||
//
|
||||
#ifndef GRPC_reflection_2eproto__INCLUDED |
||||
#define GRPC_reflection_2eproto__INCLUDED |
||||
|
||||
#include <grpc++/ext/reflection.pb.h> |
||||
|
||||
#include <grpc++/impl/codegen/async_stream.h> |
||||
#include <grpc++/impl/codegen/async_unary_call.h> |
||||
#include <grpc++/impl/codegen/method_handler_impl.h> |
||||
#include <grpc++/impl/codegen/proto_utils.h> |
||||
#include <grpc++/impl/codegen/rpc_method.h> |
||||
#include <grpc++/impl/codegen/service_type.h> |
||||
#include <grpc++/impl/codegen/status.h> |
||||
#include <grpc++/impl/codegen/stub_options.h> |
||||
#include <grpc++/impl/codegen/sync_stream.h> |
||||
|
||||
namespace grpc { |
||||
class CompletionQueue; |
||||
class Channel; |
||||
class RpcService; |
||||
class ServerCompletionQueue; |
||||
class ServerContext; |
||||
} // namespace grpc
|
||||
|
||||
namespace grpc { |
||||
namespace reflection { |
||||
namespace v1alpha { |
||||
|
||||
class ServerReflection GRPC_FINAL { |
||||
public: |
||||
class StubInterface { |
||||
public: |
||||
virtual ~StubInterface() {} |
||||
// The reflection service is structured as a bidirectional stream, ensuring
|
||||
// all related requests go to a single server.
|
||||
std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) { |
||||
return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context)); |
||||
} |
||||
std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { |
||||
return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag)); |
||||
} |
||||
private: |
||||
virtual ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) = 0; |
||||
virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; |
||||
}; |
||||
class Stub GRPC_FINAL : public StubInterface { |
||||
public: |
||||
Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); |
||||
std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) { |
||||
return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context)); |
||||
} |
||||
std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { |
||||
return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag)); |
||||
} |
||||
|
||||
private: |
||||
std::shared_ptr< ::grpc::ChannelInterface> channel_; |
||||
::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) GRPC_OVERRIDE; |
||||
::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE; |
||||
const ::grpc::RpcMethod rpcmethod_ServerReflectionInfo_; |
||||
}; |
||||
static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); |
||||
|
||||
class Service : public ::grpc::Service { |
||||
public: |
||||
Service(); |
||||
virtual ~Service(); |
||||
// The reflection service is structured as a bidirectional stream, ensuring
|
||||
// all related requests go to a single server.
|
||||
virtual ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream); |
||||
}; |
||||
template <class BaseClass> |
||||
class WithAsyncMethod_ServerReflectionInfo : public BaseClass { |
||||
private: |
||||
void BaseClassMustBeDerivedFromService(const Service *service) {} |
||||
public: |
||||
WithAsyncMethod_ServerReflectionInfo() { |
||||
::grpc::Service::MarkMethodAsync(0); |
||||
} |
||||
~WithAsyncMethod_ServerReflectionInfo() GRPC_OVERRIDE { |
||||
BaseClassMustBeDerivedFromService(this); |
||||
} |
||||
// disable synchronous version of this method
|
||||
::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { |
||||
abort(); |
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
||||
} |
||||
void RequestServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
||||
::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); |
||||
} |
||||
}; |
||||
typedef WithAsyncMethod_ServerReflectionInfo<Service > AsyncService; |
||||
template <class BaseClass> |
||||
class WithGenericMethod_ServerReflectionInfo : public BaseClass { |
||||
private: |
||||
void BaseClassMustBeDerivedFromService(const Service *service) {} |
||||
public: |
||||
WithGenericMethod_ServerReflectionInfo() { |
||||
::grpc::Service::MarkMethodGeneric(0); |
||||
} |
||||
~WithGenericMethod_ServerReflectionInfo() GRPC_OVERRIDE { |
||||
BaseClassMustBeDerivedFromService(this); |
||||
} |
||||
// disable synchronous version of this method
|
||||
::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { |
||||
abort(); |
||||
return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); |
||||
} |
||||
}; |
||||
typedef Service StreamedUnaryService; |
||||
typedef Service SplitStreamedService; |
||||
typedef Service StreamedService; |
||||
}; |
||||
|
||||
} // namespace v1alpha
|
||||
} // namespace reflection
|
||||
} // namespace grpc
|
||||
|
||||
|
||||
#endif // GRPC_reflection_2eproto__INCLUDED
|
File diff suppressed because it is too large
Load Diff
@ -1,111 +0,0 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H |
||||
#define GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H |
||||
|
||||
#include <grpc++/impl/codegen/core_codegen_interface.h> |
||||
|
||||
namespace grpc { |
||||
|
||||
extern CoreCodegenInterface *g_core_codegen_interface; |
||||
|
||||
template <class mutex> |
||||
class lock_guard; |
||||
class condition_variable; |
||||
|
||||
class mutex { |
||||
public: |
||||
mutex() { g_core_codegen_interface->gpr_mu_init(&mu_); } |
||||
~mutex() { g_core_codegen_interface->gpr_mu_destroy(&mu_); } |
||||
|
||||
private: |
||||
::gpr_mu mu_; |
||||
template <class mutex> |
||||
friend class lock_guard; |
||||
friend class condition_variable; |
||||
}; |
||||
|
||||
template <class mutex> |
||||
class lock_guard { |
||||
public: |
||||
lock_guard(mutex &mu) : mu_(mu), locked(true) { |
||||
g_core_codegen_interface->gpr_mu_lock(&mu.mu_); |
||||
} |
||||
~lock_guard() { unlock_internal(); } |
||||
|
||||
protected: |
||||
void lock_internal() { |
||||
if (!locked) g_core_codegen_interface->gpr_mu_lock(&mu_.mu_); |
||||
locked = true; |
||||
} |
||||
void unlock_internal() { |
||||
if (locked) g_core_codegen_interface->gpr_mu_unlock(&mu_.mu_); |
||||
locked = false; |
||||
} |
||||
|
||||
private: |
||||
mutex &mu_; |
||||
bool locked; |
||||
friend class condition_variable; |
||||
}; |
||||
|
||||
template <class mutex> |
||||
class unique_lock : public lock_guard<mutex> { |
||||
public: |
||||
unique_lock(mutex &mu) : lock_guard<mutex>(mu) {} |
||||
void lock() { this->lock_internal(); } |
||||
void unlock() { this->unlock_internal(); } |
||||
}; |
||||
|
||||
class condition_variable { |
||||
public: |
||||
condition_variable() { g_core_codegen_interface->gpr_cv_init(&cv_); } |
||||
~condition_variable() { g_core_codegen_interface->gpr_cv_destroy(&cv_); } |
||||
void wait(lock_guard<mutex> &mu) { |
||||
mu.locked = false; |
||||
g_core_codegen_interface->gpr_cv_wait( |
||||
&cv_, &mu.mu_.mu_, |
||||
g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME)); |
||||
mu.locked = true; |
||||
} |
||||
void notify_one() { g_core_codegen_interface->gpr_cv_signal(&cv_); } |
||||
void notify_all() { g_core_codegen_interface->gpr_cv_broadcast(&cv_); } |
||||
|
||||
private: |
||||
gpr_cv cv_; |
||||
}; |
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCXX_IMPL_CODEGEN_SYNC_NO_CXX11_H
|
@ -1,39 +0,0 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPCXX_IMPL_SYNC_H |
||||
#define GRPCXX_IMPL_SYNC_H |
||||
|
||||
#include <grpc++/impl/codegen/sync.h> |
||||
|
||||
#endif // GRPCXX_IMPL_SYNC_H
|
@ -1,117 +0,0 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPCXX_IMPL_THD_NO_CXX11_H |
||||
#define GRPCXX_IMPL_THD_NO_CXX11_H |
||||
|
||||
#include <grpc/support/thd.h> |
||||
|
||||
namespace grpc { |
||||
|
||||
class thread { |
||||
public: |
||||
template <class T> |
||||
thread(void (T::*fptr)(), T *obj) { |
||||
func_ = new thread_function<T>(fptr, obj); |
||||
joined_ = false; |
||||
start(); |
||||
} |
||||
template <class T, class U> |
||||
thread(void (T::*fptr)(U arg), T *obj, U arg) { |
||||
func_ = new thread_function_arg<T, U>(fptr, obj, arg); |
||||
joined_ = false; |
||||
start(); |
||||
} |
||||
~thread() { |
||||
if (!joined_) std::terminate(); |
||||
delete func_; |
||||
} |
||||
thread(thread &&other) |
||||
: func_(other.func_), thd_(other.thd_), joined_(other.joined_) { |
||||
other.joined_ = true; |
||||
other.func_ = NULL; |
||||
} |
||||
void join() { |
||||
gpr_thd_join(thd_); |
||||
joined_ = true; |
||||
} |
||||
|
||||
private: |
||||
void start() { |
||||
gpr_thd_options options = gpr_thd_options_default(); |
||||
gpr_thd_options_set_joinable(&options); |
||||
gpr_thd_new(&thd_, thread_func, (void *)func_, &options); |
||||
} |
||||
static void thread_func(void *arg) { |
||||
thread_function_base *func = (thread_function_base *)arg; |
||||
func->call(); |
||||
} |
||||
class thread_function_base { |
||||
public: |
||||
virtual ~thread_function_base() {} |
||||
virtual void call() = 0; |
||||
}; |
||||
template <class T> |
||||
class thread_function : public thread_function_base { |
||||
public: |
||||
thread_function(void (T::*fptr)(), T *obj) : fptr_(fptr), obj_(obj) {} |
||||
virtual void call() { (obj_->*fptr_)(); } |
||||
|
||||
private: |
||||
void (T::*fptr_)(); |
||||
T *obj_; |
||||
}; |
||||
template <class T, class U> |
||||
class thread_function_arg : public thread_function_base { |
||||
public: |
||||
thread_function_arg(void (T::*fptr)(U arg), T *obj, U arg) |
||||
: fptr_(fptr), obj_(obj), arg_(arg) {} |
||||
virtual void call() { (obj_->*fptr_)(arg_); } |
||||
|
||||
private: |
||||
void (T::*fptr_)(U arg); |
||||
T *obj_; |
||||
U arg_; |
||||
}; |
||||
thread_function_base *func_; |
||||
gpr_thd_id thd_; |
||||
bool joined_; |
||||
|
||||
// Disallow copy and assign.
|
||||
thread(const thread &); |
||||
void operator=(const thread &); |
||||
}; |
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCXX_IMPL_THD_NO_CXX11_H
|
@ -0,0 +1,70 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2016, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPCXX_RESOURCE_QUOTA_H |
||||
#define GRPCXX_RESOURCE_QUOTA_H |
||||
|
||||
struct grpc_resource_quota; |
||||
|
||||
#include <grpc++/impl/codegen/config.h> |
||||
|
||||
namespace grpc { |
||||
|
||||
/// ResourceQuota represents a bound on memory usage by the gRPC library.
|
||||
/// A ResourceQuota can be attached to a server (via ServerBuilder), or a client
|
||||
/// channel (via ChannelArguments). gRPC will attempt to keep memory used by
|
||||
/// all attached entities below the ResourceQuota bound.
|
||||
class ResourceQuota final { |
||||
public: |
||||
explicit ResourceQuota(const grpc::string& name); |
||||
ResourceQuota(); |
||||
~ResourceQuota(); |
||||
|
||||
/// Resize this ResourceQuota to a new size. If new_size is smaller than the
|
||||
/// current size of the pool, memory usage will be monotonically decreased
|
||||
/// until it falls under new_size. No time bound is given for this to occur
|
||||
/// however.
|
||||
ResourceQuota& Resize(size_t new_size); |
||||
|
||||
grpc_resource_quota* c_resource_quota() const { return impl_; } |
||||
|
||||
private: |
||||
ResourceQuota(const ResourceQuota& rhs); |
||||
ResourceQuota& operator=(const ResourceQuota& rhs); |
||||
|
||||
grpc_resource_quota* const impl_; |
||||
}; |
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCXX_RESOURCE_QUOTA_H
|
@ -0,0 +1,53 @@ |
||||
#!/usr/bin/env python2.7 |
||||
|
||||
# Copyright 2015, Google Inc. |
||||
# All rights reserved. |
||||
# |
||||
# Redistribution and use in source and binary forms, with or without |
||||
# modification, are permitted provided that the following conditions are |
||||
# met: |
||||
# |
||||
# * Redistributions of source code must retain the above copyright |
||||
# notice, this list of conditions and the following disclaimer. |
||||
# * Redistributions in binary form must reproduce the above |
||||
# copyright notice, this list of conditions and the following disclaimer |
||||
# in the documentation and/or other materials provided with the |
||||
# distribution. |
||||
# * Neither the name of Google Inc. nor the names of its |
||||
# contributors may be used to endorse or promote products derived from |
||||
# this software without specific prior written permission. |
||||
# |
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
import os |
||||
import sys |
||||
import glob |
||||
import yaml |
||||
|
||||
os.chdir(os.path.dirname(sys.argv[0])+'/../..') |
||||
|
||||
out = {} |
||||
|
||||
out['libs'] = [{ |
||||
'name': 'benchmark', |
||||
'build': 'private', |
||||
'language': 'c++', |
||||
'secure': 'no', |
||||
'defaults': 'benchmark', |
||||
'src': sorted(glob.glob('third_party/benchmark/src/*.cc')), |
||||
'headers': sorted( |
||||
glob.glob('third_party/benchmark/src/*.h') + |
||||
glob.glob('third_party/benchmark/include/benchmark/*.h')), |
||||
}] |
||||
|
||||
print yaml.dump(out) |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue