Skip to content

Commit

Permalink
Fix healthCheckEndpoint when using docker containers to not miss the …
Browse files Browse the repository at this point in the history
…scheme in the URL
  • Loading branch information
gcotelli committed Feb 17, 2022
1 parent a6f218b commit 8eaa730
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
20 changes: 14 additions & 6 deletions source/Stargate-Consul/ConsulAwareStargateApplication.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@ ConsulAwareStargateApplication class >> isAbstract [
^ self = ConsulAwareStargateApplication
]

{ #category : #'*Stargate-Consul' }
{ #category : #private }
ConsulAwareStargateApplication class >> stargateConfigurationParameters [

^ super stargateConfigurationParameters , { MandatoryConfigurationParameter
named: 'Consul Agent Location'
describedBy: 'Location of the Consul Agent. Leave empty to disable the plugin'
inside: self sectionsForStargateConfiguration
convertingWith: #asUrl }
^ super stargateConfigurationParameters , {
(MandatoryConfigurationParameter
named: 'Consul Agent Location'
describedBy:
'Location of the Consul Agent. Leave empty to disable the plugin'
inside: self sectionsForStargateConfiguration
convertingWith: #asUrl).
(OptionalConfigurationParameter
named: 'Scheme'
describedBy: 'Transport scheme. It''s used to configure Consul HTTP checks'
inside: self sectionsForStargateConfiguration
defaultingTo: 'http') }
]

{ #category : #'private - building' }
Expand Down Expand Up @@ -91,6 +98,7 @@ ConsulAwareStargateApplication >> healthCheckEndpoint [
baseUrl := self
withDockerHostnameDo: [ :hostname |
ZnUrl new
scheme: self stargateConfiguration scheme;
host: hostname;
port: self stargateConfiguration port;
yourself
Expand Down
11 changes: 0 additions & 11 deletions source/Stargate-Consul/ConsulAwareStargateApplication.extension.st

This file was deleted.

0 comments on commit 8eaa730

Please sign in to comment.