Services
Here are some code examples for a Basic Service, Metrics and Database Facilities and Transports
Go here for a more detailed look into Services: getting_started
Basic Service
from omni.services.core import main
def hello_world() -> str:
return "Hello World!"
main.register_endpoint("get", "/hello-world", hello_world)
That is all there is needed to write a service. To run this with Omniverse Kit and an HTTP transport:
./kit \
--exec hello_world.py \
--enable omni.services.core \
--enable omni.services.transport.server.http \
--/exts/omni.kit.registry.nucleus/registries/0/name=kit/services \
--/exts/omni.kit.registry.nucleus/registries/0/url=https://dw290v42wisod.cloudfront.net/exts/kit/services
Transports
Transports allow different protocols and communication channels to be used with the Omniverse microservices stack.