Since v3, Stargate-Consul brings support on top of API Skeletons.
To use it, subclass ConsulAwareStargateApplication
instead of StargateApplication
and implement the additionally required subclass responsibilities:
serviceDefinitions
^Array with:
(self
buildServiceDefinitionNamed: 'service'
configuredBy: [ :builder | builder addTag: 'example' ])
By using this support the application will enable the Consul Service Discovery plugin and will use the Consul API to register itself on startup and deregister on shutdown.