You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package com.example.fn;
import com.fnproject.fn.api.FnConfiguration;
import com.fnproject.fn.api.RuntimeContext;
public class PojoFunction {
private String greeting;
@FnConfiguration
public void setUp(RuntimeContext ctx) {
greeting = ctx.getConfigurationByKey("GREETING").orElse("Hello");
}
public Object greet(String name) {
if (name == null || name.isEmpty()) {
name = "World";
}
// System.out.println(name);
return new Greeting(greeting, name);
}
public static class Greeting {
public final String name;
public final String salutation;
public Greeting(String salutation, String name) {
this.salutation = salutation;
this.name = name;
}
}
}
and deploying PojoFunction to Fn Server allows PojoFunction to be seen in a running fn-ui container.
It is then possible to add Configurations for PojoFunction by executing the Edit button for that deployment.
There's several problems with this.
already configured config values are not shown
configuration values added here are of no relevance to a fn call execution. i.e. the value are ignored
The text was updated successfully, but these errors were encountered:
Having
and deploying PojoFunction to Fn Server allows PojoFunction to be seen in a running fn-ui container.
It is then possible to add Configurations for PojoFunction by executing the Edit button for that deployment.
There's several problems with this.
The text was updated successfully, but these errors were encountered: