Ejemplo n.º 1
0
def create_interface_routes(app, interface: Interface):
    for method in interface.exposed_methods():
        sig = interface.exposed_method_signature(method)
        rlogger.debug('registering %s with input type %s and output type %s',
                      method, sig.args, sig.output)

        spec = create_spec(method, sig)
        executor_function = create_executor_function(interface, method, spec)
        app.router.add_post('/' + method, executor_function)
Ejemplo n.º 2
0
def create_interface_routes(app, interface: Interface):
    for method in interface.exposed_methods():
        sig = interface.exposed_method_signature(method)
        rlogger.debug('registering %s with input type %s and output type %s', method, sig.args, sig.output)
        _register_method(app, interface, method, sig)