总览
入口
package org.apache.flink.statefun.docs.io.ingress;
import org.apache.flink.statefun.docs.models.User;
import org.apache.flink.statefun.sdk.io.IngressIdentifier;
public final class Identifiers {
public static final IngressIdentifier<User> INGRESS =
new IngressIdentifier<>(User.class, "example", "user-ingress");
}package org.apache.flink.statefun.docs.io.ingress;
import java.util.Map;
import org.apache.flink.statefun.docs.io.MissingImplementationException;
import org.apache.flink.statefun.docs.models.User;
import org.apache.flink.statefun.sdk.io.IngressIdentifier;
import org.apache.flink.statefun.sdk.io.IngressSpec;
import org.apache.flink.statefun.sdk.spi.StatefulFunctionModule;
public class ModuleWithIngress implements StatefulFunctionModule {
@Override
public void configure(Map<String, String> globalConfiguration, Binder binder) {
IngressSpec<User> spec = createIngress(Identifiers.INGRESS);
binder.bindIngress(spec);
}
private IngressSpec<User> createIngress(IngressIdentifier<User> identifier) {
throw new MissingImplementationException("Replace with your specific ingress");
}
}路由器
出口
Last updated