blob: 8bc21072705a9ae991a089287c71d2dd1de53ef6 [file] [log] [blame]
Yihua Zhang1435bfc2017-07-17 11:20:51 -07001/*
2 *
3 * Copyright 2017 gRPC authors.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19#ifndef GRPC_CORE_TSI_GTS_TRANSPORT_SECURITY_H
20#define GRPC_CORE_TSI_GTS_TRANSPORT_SECURITY_H
21
22#include <grpc/grpc.h>
23#include <grpc/support/sync.h>
24#include <grpc/support/thd.h>
25
Yash Tibrewala7e6d652017-09-20 18:56:37 -070026#ifdef __cplusplus
27extern "C" {
28#endif
29
Yihua Zhang1435bfc2017-07-17 11:20:51 -070030typedef struct gts_shared_resource {
31 gpr_thd_id thread_id;
Craig Tillerbaa14a92017-11-03 09:09:36 -070032 grpc_channel* channel;
33 grpc_completion_queue* cq;
Yihua Zhang1435bfc2017-07-17 11:20:51 -070034 gpr_mu mu;
35} gts_shared_resource;
36
37/* This method returns the address of gts_shared_resource object shared by all
38 * TSI handshakes. */
Craig Tillerbaa14a92017-11-03 09:09:36 -070039gts_shared_resource* gts_get_shared_resource(void);
Yihua Zhang1435bfc2017-07-17 11:20:51 -070040
Yash Tibrewala7e6d652017-09-20 18:56:37 -070041#ifdef __cplusplus
42}
43#endif
44
Yash Tibrewal12fc6d42017-10-09 16:43:34 -070045#endif /* GRPC_CORE_TSI_GTS_TRANSPORT_SECURITY_H */