pub struct FunctionConfig {
pub tenant: String,
pub namespace: String,
pub name: String,
pub class_name: String,
pub inputs: Vec<String>,
pub output: String,
pub runtime: String,
pub parallelism: i32,
pub user_config: Option<Value>,
}Expand description
Pulsar Functions configuration — the subset of Java’s
org.apache.pulsar.common.functions.FunctionConfig that the URL-based
register / update calls actually require. The Java type carries
~30 fields (process / k8s runtime tuning, secrets, deadletter
topics, …); we expose the load-bearing ones an operator running a
pre-compiled JAR needs. Unknown fields on the wire are tolerated by
the broker, so adding extra knobs is an additive change later.
tenant / namespace / name are duplicated in the body because
the broker re-validates them against the URL path (Java’s
WorkerUtils.validateFunctionName). The CLI fills these in from the
fully qualified name the operator passes on the command line.
runtime is the string "JAVA", "PYTHON", or "GO" — matches
Java’s org.apache.pulsar.common.functions.FunctionConfig.Runtime
enum serialised by name.
Fields§
§tenant: StringOwning tenant.
namespace: StringOwning namespace (bare name, not tenant/namespace).
name: StringFunction name (unique within the namespace).
class_name: StringFully qualified entry-point class name (com.acme.MyFunction
for Java; module.fn for Python; main for Go).
inputs: Vec<String>Input topics the function subscribes to.
output: StringOutput topic the function produces to. Empty when the function has no output sink.
runtime: StringRuntime — "JAVA", "PYTHON", or "GO".
parallelism: i32Number of parallel instances the worker schedules.
user_config: Option<Value>Optional opaque user-config map passed to the function’s
Context#getUserConfigValue. JSON object on the wire.
Trait Implementations§
Source§impl Clone for FunctionConfig
impl Clone for FunctionConfig
Source§fn clone(&self) -> FunctionConfig
fn clone(&self) -> FunctionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more