Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 667 Bytes

Skeleton.md

File metadata and controls

18 lines (13 loc) · 667 Bytes

API Skeletons

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.