Merge pull request #1026 from lavalamp/redirect

Add simple service redirection
This commit is contained in:
Daniel Smith
2014-08-28 14:54:10 -07:00
11 changed files with 229 additions and 25 deletions

View File

@@ -72,6 +72,7 @@ func (e *EndpointController) SyncServiceEndpoints() error {
}
endpoints[ix] = net.JoinHostPort(pod.CurrentState.PodIP, strconv.Itoa(port))
}
// TODO: this is totally broken, we need to compute this and store inside an AtomicUpdate loop.
err = e.serviceRegistry.UpdateEndpoints(api.Endpoints{
JSONBase: api.JSONBase{ID: service.ID},
Endpoints: endpoints,