@Test public void testFunctions() { StatefulFunctionModule module = fromPath("bar-module/module.yaml"); StatefulFunctionsUniverse universe = emptyUniverse(); module.configure(Collections.emptyMap(), universe); assertThat( universe.functions(), allOf( hasKey(new FunctionType("com.example", "hello")), hasKey(new FunctionType("com.foo", "world")))); }
public void configure(Map<String, String> conf, Binder binder) { try { configureFunctions(binder, Selectors.listAt(spec, Pointers.FUNCTIONS_POINTER)); configureRouters(binder, Selectors.listAt(spec, Pointers.ROUTERS_POINTER)); configureIngress(binder, Selectors.listAt(spec, Pointers.INGRESSES_POINTER)); } catch (Throwable t) { throw new ModuleConfigurationException( format("Error while parsing module at %s", moduleUrl), t); } }
JsonModule implements StatefulFunctionModule { public void configure(Map<String, String> conf, Binder binder) { try { configureFunctions(binder, Selectors.listAt(spec, Pointers.FUNCTIONS_POINTER)); configureRouters(binder, Selectors.listAt(spec, Pointers.ROUTERS_POINTER)); configureIngress(binder, Selectors.listAt(spec, Pointers.INGRESSES_POINTER)); } catch (Throwable t) { throw new ModuleConfigurationException( format("Error while parsing module at %s", moduleUrl), t); } } }
JsonModule implements StatefulFunctionModule { public void configure(Map<String, String> conf, Binder binder) { try { configureFunctions(binder, Selectors.listAt(spec, Pointers.FUNCTIONS_POINTER)); configureRouters(binder, Selectors.listAt(spec, Pointers.ROUTERS_POINTER)); configureIngress(binder, Selectors.listAt(spec, Pointers.INGRESSES_POINTER)); } catch (Throwable t) { throw new ModuleConfigurationException( format("Error while parsing module at %s", moduleUrl), t); } } JsonModule(JsonNode spec, URL moduleUrl); }
JsonModule implements StatefulFunctionModule { public void configure(Map<String, String> conf, Binder binder) { try { configureFunctions(binder, Selectors.listAt(spec, Pointers.FUNCTIONS_POINTER)); configureRouters(binder, Selectors.listAt(spec, Pointers.ROUTERS_POINTER)); configureIngress(binder, Selectors.listAt(spec, Pointers.INGRESSES_POINTER)); } catch (Throwable t) { throw new ModuleConfigurationException( format("Error while parsing module at %s", moduleUrl), t); } } JsonModule(JsonNode spec, URL moduleUrl); void configure(Map<String, String> conf, Binder binder); }
JsonModule implements StatefulFunctionModule { public void configure(Map<String, String> conf, Binder binder) { try { configureFunctions(binder, Selectors.listAt(spec, Pointers.FUNCTIONS_POINTER)); configureRouters(binder, Selectors.listAt(spec, Pointers.ROUTERS_POINTER)); configureIngress(binder, Selectors.listAt(spec, Pointers.INGRESSES_POINTER)); } catch (Throwable t) { throw new ModuleConfigurationException( format("Error while parsing module at %s", moduleUrl), t); } } JsonModule(JsonNode spec, URL moduleUrl); void configure(Map<String, String> conf, Binder binder);  }