open-consul/agent/config
Pierre Souchay 473e589d86 Implementation of Weights Data structures (#4468)
* Implementation of Weights Data structures

Adding this datastructure will allow us to resolve the
issues #1088 and #4198

This new structure defaults to values:
```
   { Passing: 1, Warning: 0 }
```

Which means, use weight of 0 for a Service in Warning State
while use Weight 1 for a Healthy Service.
Thus it remains compatible with previous Consul versions.

* Implemented weights for DNS SRV Records

* DNS properly support agents with weight support while server does not (backwards compatibility)

* Use Warning value of Weights of 1 by default

When using DNS interface with only_passing = false, all nodes
with non-Critical healthcheck used to have a weight value of 1.
While having weight.Warning = 0 as default value, this is probably
a bad idea as it breaks ascending compatibility.

Thus, we put a default value of 1 to be consistent with existing behaviour.

* Added documentation for new weight field in service description

* Better documentation about weights as suggested by @banks

* Return weight = 1 for unknown Check states as suggested by @banks

* Fixed typo (of -> or) in error message as requested by @mkeeler

* Fixed unstable unit test TestRetryJoin

* Fixed unstable tests

* Fixed wrong Fatalf format in `testrpc/wait.go`

* Added notes regarding DNS SRV lookup limitations regarding number of instances

* Documentation fixes and clarification regarding SRV records with weights as requested by @banks

* Rephrase docs
2018-09-07 15:30:47 +01:00
..
builder.go Implementation of Weights Data structures (#4468) 2018-09-07 15:30:47 +01:00
config.go Implementation of Weights Data structures (#4468) 2018-09-07 15:30:47 +01:00
default.go Gossip tuneables (#4444) 2018-07-26 11:39:49 -04:00
default_oss.go Add enterprise default config section 2018-02-05 13:33:59 -08:00
doc.go Metrics service prefix (#3498) 2017-09-26 17:49:55 -07:00
flags.go Adds a new command line flag -log-file for file based logging. (#4581) 2018-08-29 16:56:58 -04:00
flags_test.go Make Serf LAN & WAN port configurable from CLI 2018-07-21 02:17:21 +09:00
flagset.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
merge.go Changes maps to merge vs. overwrite when processing configs. 2017-12-13 16:06:01 -08:00
merge_test.go Changes maps to merge vs. overwrite when processing configs. 2017-12-13 16:06:01 -08:00
patch_hcl.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
patch_hcl_test.go New config parser, HCL support, multiple bind addrs (#3480) 2017-09-25 11:40:42 -07:00
runtime.go Adds a new command line flag -log-file for file based logging. (#4581) 2018-08-29 16:56:58 -04:00
runtime_test.go Implementation of Weights Data structures (#4468) 2018-09-07 15:30:47 +01:00
segment_oss.go Renames "segments" to "segment" to be consistent with other files. 2017-11-29 18:36:52 -08:00
segment_oss_test.go Renames "segments" to "segment" to be consistent with other files. 2017-11-29 18:36:52 -08:00
translate.go config: add generic method to translate between CamelCase and snake_case (#3557) 2017-10-10 16:40:59 -07:00
translate_test.go config: add generic method to translate between CamelCase and snake_case (#3557) 2017-10-10 16:40:59 -07:00