Search in sources :

Example 1 with NameAndConfigBasedSecretsProviderConfigurator

use of org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator in project incubator-pulsar by apache.

the class LocalRunner method getSecretsProviderConfigurator.

private SecretsProviderConfigurator getSecretsProviderConfigurator() {
    SecretsProviderConfigurator secretsProviderConfigurator;
    if (secretsProviderClassName != null) {
        Map<String, String> config = null;
        if (secretsProviderConfig != null) {
            config = (Map<String, String>) new Gson().fromJson(secretsProviderConfig, Map.class);
        }
        secretsProviderConfigurator = new NameAndConfigBasedSecretsProviderConfigurator(secretsProviderClassName, config);
    } else {
        secretsProviderConfigurator = new DefaultSecretsProviderConfigurator();
    }
    return secretsProviderConfigurator;
}
Also used : DefaultSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.DefaultSecretsProviderConfigurator) NameAndConfigBasedSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator) SecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.SecretsProviderConfigurator) DefaultSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.DefaultSecretsProviderConfigurator) Gson(com.google.gson.Gson) NameAndConfigBasedSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator)

Example 2 with NameAndConfigBasedSecretsProviderConfigurator

use of org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator in project pulsar by yahoo.

the class LocalRunner method getSecretsProviderConfigurator.

private SecretsProviderConfigurator getSecretsProviderConfigurator() {
    SecretsProviderConfigurator secretsProviderConfigurator;
    if (secretsProviderClassName != null) {
        Map<String, String> config = null;
        if (secretsProviderConfig != null) {
            config = (Map<String, String>) new Gson().fromJson(secretsProviderConfig, Map.class);
        }
        secretsProviderConfigurator = new NameAndConfigBasedSecretsProviderConfigurator(secretsProviderClassName, config);
    } else {
        secretsProviderConfigurator = new DefaultSecretsProviderConfigurator();
    }
    return secretsProviderConfigurator;
}
Also used : DefaultSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.DefaultSecretsProviderConfigurator) NameAndConfigBasedSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator) SecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.SecretsProviderConfigurator) DefaultSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.DefaultSecretsProviderConfigurator) Gson(com.google.gson.Gson) NameAndConfigBasedSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator)

Example 3 with NameAndConfigBasedSecretsProviderConfigurator

use of org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator in project pulsar by apache.

the class LocalRunner method getSecretsProviderConfigurator.

private SecretsProviderConfigurator getSecretsProviderConfigurator() {
    SecretsProviderConfigurator secretsProviderConfigurator;
    if (secretsProviderClassName != null) {
        Map<String, String> config = null;
        if (secretsProviderConfig != null) {
            config = (Map<String, String>) new Gson().fromJson(secretsProviderConfig, Map.class);
        }
        secretsProviderConfigurator = new NameAndConfigBasedSecretsProviderConfigurator(secretsProviderClassName, config);
    } else {
        secretsProviderConfigurator = new DefaultSecretsProviderConfigurator();
    }
    return secretsProviderConfigurator;
}
Also used : DefaultSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.DefaultSecretsProviderConfigurator) NameAndConfigBasedSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator) SecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.SecretsProviderConfigurator) DefaultSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.DefaultSecretsProviderConfigurator) Gson(com.google.gson.Gson) NameAndConfigBasedSecretsProviderConfigurator(org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator)

Aggregations

Gson (com.google.gson.Gson)3 DefaultSecretsProviderConfigurator (org.apache.pulsar.functions.secretsproviderconfigurator.DefaultSecretsProviderConfigurator)3 NameAndConfigBasedSecretsProviderConfigurator (org.apache.pulsar.functions.secretsproviderconfigurator.NameAndConfigBasedSecretsProviderConfigurator)3 SecretsProviderConfigurator (org.apache.pulsar.functions.secretsproviderconfigurator.SecretsProviderConfigurator)3