Skip to content

Commit

Permalink
fix type casting for the exposed API client parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi18av committed Jul 17, 2024
1 parent 845db90 commit b46f5d0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ class NomadClientOpts{

final String address
final String token
final connectionTimeout
final int connectionTimeout

//NOTE: For now, these are not exposed.
final readTimeout = 6000
final writeTimeout = 6000
final int readTimeout = 6000
final int writeTimeout = 6000

NomadClientOpts(Map nomadClientOpts, Map<String,String> env=null){
assert nomadClientOpts!=null
Expand All @@ -55,7 +55,7 @@ class NomadClientOpts{
address +="/"
this.address = address + API_VERSION
this.token = nomadClientOpts.token ?: sysEnv.get('NOMAD_TOKEN')
this.connectionTimeout = nomadClientOpts.connectionTimeout ?: 6000
this.connectionTimeout = (nomadClientOpts.connectionTimeout ?: 6000 ) as Integer

//TODO: Add mTLS properties and env vars
// https://developer.hashicorp.com/nomad/docs/commands#mtls-environment-variables
Expand Down

0 comments on commit b46f5d0

Please sign in to comment.