this rewrites the load balancer which was pointed out to be problematic here:
https://github.com/iron-io/functions/issues/570 with a test suite located at
test/fnlb-test-harness -- this test is now 'passing' in the sense that now
when running multiple functions nodes behind 1 load balancer every call goes
to the same functions node. yay. used a different consistent hashing algorithm
and also threw out all the fallback code (all the code, really).
this is basically an mvp and there is some work that needs to be done for
running multiple load balancers, allowing functions to run on more nodes as
load increases and some basic features like http/2 -- also needs some love to
be really robust; most of this is noted in TODOs in the file.
this does basic health checking configurable in the same way as aws elb. I
think we could probably do gossip but this works as a first cut. after N
health checks fail then requests start to go to a different node, meanwhile
all requests to that node will fail (need to fix). this continues to use
consistent hashing, which is great in that we don't need to store anything,
and we may be able to stick with the strategy in the future with some care.
* making things work
* #506 - Add ability to login to a private docker registry
* Rolling back "make things work" to test them out more.
* Rolling back "make things work" to test them out more.
* credentials from docker/config.json if ENV is missing
* should get docker auth info just in the init
* update glide lock
* update glide
* Switched to new go dep tool, glide is too frikin annoying.
* Updated circle builds to use dep
* Added GOPATH/bin to path.
* Added GOPATH/bin to path.
* Using regular make test, instead of docker one (not sure why it was using the docker one?).
* Solving postgres marshal/unmarshal issue
Postgres datastore was not marshaling the App config during its insert, that behavior was resulting in issues when fetching the App and the datastore couldn't unmarshal the config.
The same issue was probably happening with the Route's headers in some situations.
This commit's idea is to always try to marshal configs and headers when inserting/updating Apps or Routes. But in Apps and Routes get methods, if the config/headers unmarshal fails, it returns an empty config/headers.
* fix one more unmarshal case
* returning error when unmarshaling non-empty