grpc
src
core
ext
xds
certificate_provider_factory.h
Go to the documentation of this file.
1
//
2
//
3
// Copyright 2020 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_EXT_XDS_CERTIFICATE_PROVIDER_FACTORY_H
20
#define GRPC_CORE_EXT_XDS_CERTIFICATE_PROVIDER_FACTORY_H
21
22
#include <
grpc/support/port_platform.h
>
23
24
#include <string>
25
26
#include <
grpc/grpc_security.h
>
27
28
#include "
src/core/lib/gprpp/ref_counted.h
"
29
#include "
src/core/lib/gprpp/ref_counted_ptr.h
"
30
#include "
src/core/lib/iomgr/error.h
"
31
#include "
src/core/lib/json/json.h
"
32
33
namespace
grpc_core
{
34
35
// Factories for plugins. Each plugin implementation should create its own
36
// factory implementation and register an instance with the registry.
37
class
CertificateProviderFactory
{
38
public
:
39
// Interface for configs for CertificateProviders.
40
class
Config
:
public
RefCounted
<Config> {
41
public
:
42
~Config
()
override
=
default
;
43
44
// Name of the type of the CertificateProvider. Unique to each type of
45
// config.
46
virtual
const
char
*
name
()
const
= 0;
47
48
virtual
std::string
ToString
()
const
= 0;
49
};
50
51
virtual
~CertificateProviderFactory
() =
default
;
52
53
// Name of the plugin.
54
virtual
const
char
*
name
()
const
= 0;
55
56
virtual
RefCountedPtr<Config>
CreateCertificateProviderConfig
(
57
const
Json
& config_json,
grpc_error_handle
*
error
) = 0;
58
59
// Create a CertificateProvider instance from config.
60
virtual
RefCountedPtr<grpc_tls_certificate_provider>
61
CreateCertificateProvider
(
RefCountedPtr<Config>
config
) = 0;
62
};
63
64
}
// namespace grpc_core
65
66
#endif // GRPC_CORE_EXT_XDS_CERTIFICATE_PROVIDER_FACTORY_H
grpc_core
Definition:
call_metric_recorder.h:31
grpc_core::CertificateProviderFactory::Config::name
virtual const char * name() const =0
grpc_core::CertificateProviderFactory::~CertificateProviderFactory
virtual ~CertificateProviderFactory()=default
testing::internal::string
::std::string string
Definition:
bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
error
grpc_error_handle error
Definition:
retry_filter.cc:499
grpc_security.h
grpc_core::CertificateProviderFactory::Config::~Config
~Config() override=default
grpc_core::CertificateProviderFactory::name
virtual const char * name() const =0
grpc_core::CertificateProviderFactory::CreateCertificateProviderConfig
virtual RefCountedPtr< Config > CreateCertificateProviderConfig(const Json &config_json, grpc_error_handle *error)=0
grpc_core::RefCountedPtr
Definition:
ref_counted_ptr.h:35
Json
JSON (JavaScript Object Notation).
Definition:
third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h:227
grpc_core::CertificateProviderFactory::Config::ToString
virtual std::string ToString() const =0
error.h
json.h
grpc_core::RefCounted
Definition:
ref_counted.h:280
ref_counted.h
grpc_core::CertificateProviderFactory::Config
Definition:
certificate_provider_factory.h:40
ref_counted_ptr.h
config_s
Definition:
bloaty/third_party/zlib/deflate.c:120
grpc_core::CertificateProviderFactory
Definition:
certificate_provider_factory.h:37
grpc_error
Definition:
error_internal.h:42
grpc_core::CertificateProviderFactory::CreateCertificateProvider
virtual RefCountedPtr< grpc_tls_certificate_provider > CreateCertificateProvider(RefCountedPtr< Config > config)=0
port_platform.h
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:52