open-consul/agent/structs
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
..
acl.go
acl_test.go
catalog.go agent: remove ConnectProxyServiceName 2018-06-14 09:41:49 -07:00
check_definition.go agent/config: support configuring alias check 2018-07-12 09:36:10 -07:00
check_definition_test.go Remove the script field from checks in favor of args 2018-05-08 15:31:53 -07:00
check_type.go agent/structs: check is alias if node is empty 2018-07-12 09:36:11 -07:00
connect.go More test tweaks 2018-06-25 12:25:13 -07:00
connect_ca.go connect/ca: check LeafCertTTL when rotating expired roots 2018-07-20 16:04:04 -07:00
connect_test.go Added connect proxy config and local agent state setup on boot. 2018-06-14 09:41:57 -07:00
errors.go
intention.go Fix some tests failures caused by the sorting change and some cuased by previous UpdatePrecedence() change 2018-06-25 12:25:13 -07:00
intention_test.go agent/consul: set precedence value on struct itself 2018-06-25 12:24:16 -07:00
operator.go Move autopilot to a standalone package 2017-12-11 16:45:33 -08:00
prepared_query.go agent/consul: support a Connect option on prepared query request 2018-06-25 12:24:12 -07:00
prepared_query_test.go
service_definition.go Implementation of Weights Data structures (#4468) 2018-09-07 15:30:47 +01:00
service_definition_test.go agent/structs: JSON marshal the configuration for a managed proxy 2018-06-25 12:25:12 -07:00
snapshot.go
structs.go Implementation of Weights Data structures (#4468) 2018-09-07 15:30:47 +01:00
structs_test.go Implementation of Weights Data structures (#4468) 2018-09-07 15:30:47 +01:00
testing_catalog.go agent/structs: validate service definitions, port required for proxy 2018-06-14 09:42:13 -07:00
testing_intention.go agent: use testing intention to get valid intentions 2018-06-14 09:41:43 -07:00
testing_service_definition.go agent/structs: validate service definitions, port required for proxy 2018-06-14 09:42:13 -07:00
txn.go