pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] srkukarni commented on a change in pull request #2875: Hooked up secrets function api with secret function implementations
Date Mon, 29 Oct 2018 17:10:40 GMT
srkukarni commented on a change in pull request #2875: Hooked up secrets function api with
secret function implementations
URL: https://github.com/apache/pulsar/pull/2875#discussion_r229017854
 
 

 ##########
 File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/ThreadRuntimeFactory.java
 ##########
 @@ -44,15 +53,25 @@
     private final FunctionCacheManager fnCache;
     private final PulsarClient pulsarClient;
     private final String storageServiceUrl;
+    private final SecretsProvider secretsProvider;
     private volatile boolean closed;
 
     public ThreadRuntimeFactory(String threadGroupName, String pulsarServiceUrl, String storageServiceUrl,
-            AuthenticationConfig authConfig) throws Exception {
-        this(threadGroupName, createPulsarClient(pulsarServiceUrl, authConfig), storageServiceUrl);
+                                AuthenticationConfig authConfig, String secretsProviderClassName,
+                                Map<String, String> secretsProviderConfig) throws Exception
{
+        this(threadGroupName, createPulsarClient(pulsarServiceUrl, authConfig), storageServiceUrl,
secretsProviderClassName, secretsProviderConfig);
     }
 
     @VisibleForTesting
-    public ThreadRuntimeFactory(String threadGroupName, PulsarClient pulsarClient, String
storageServiceUrl) {
+    public ThreadRuntimeFactory(String threadGroupName, PulsarClient pulsarClient, String
storageServiceUrl,
+                                String secretsProviderClassName, Map<String, String>
secretsProviderConfig) {
+        try {
+            secretsProvider = (SecretsProvider) Reflections.createInstance(secretsProviderClassName,
ClassLoader.getSystemClassLoader());
 
 Review comment:
   Done

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message