zensols.py4j.gateway
Controller application to help with invoking Clojure funcrtions from python. This uses the py4j Java Gateway server library unmarshall requests. This namespace then services the request via the zensols.py4j.invoke-namespace library.
gateway
(gateway & {:keys [port entry-point], :or {port default-port, entry-point (invokable-namespace)}})
Create and start a py4j.GatewayServer
.
If it’s already been created and started, then return that instance.
gateway-port-set-option
(gateway-port-set-option)
(gateway-port-set-option short long)
(gateway-port-set-option short long port)
invokable-namespace
(invokable-namespace)
(invokable-namespace namespace)
Create a default invokable namespace.
shutdown
(shutdown & {:keys [timeout exit?], :or {timeout :now, exit? false}})
Shutdown the gateway server. If key :timeout
is provided it will shutdown the gateway immediately if :now
, otherwise it expects an integer in milliseconds in the future to shut it down.