mirror of
https://github.com/containous/traefik.git
synced 2024-12-22 13:34:03 +03:00
Merge branch 'v1.6' into master
This commit is contained in:
commit
083b471bcf
@ -85,9 +85,9 @@ defaultEntryPoints = ["http", "https"]
|
|||||||
certFile = """-----BEGIN CERTIFICATE-----
|
certFile = """-----BEGIN CERTIFICATE-----
|
||||||
<cert file content>
|
<cert file content>
|
||||||
-----END CERTIFICATE-----"""
|
-----END CERTIFICATE-----"""
|
||||||
keyFile = """-----BEGIN CERTIFICATE-----
|
keyFile = """-----BEGIN PRIVATE KEY-----
|
||||||
<key file content>
|
<key file content>
|
||||||
-----END CERTIFICATE-----"""
|
-----END PRIVATE KEY-----"""
|
||||||
[entryPoints.other-https]
|
[entryPoints.other-https]
|
||||||
address = ":4443"
|
address = ":4443"
|
||||||
[entryPoints.other-https.tls]
|
[entryPoints.other-https.tls]
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package consulcatalog
|
package consulcatalog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -156,14 +155,8 @@ func (p *Provider) watch(configurationChan chan<- types.ConfigMessage, stop chan
|
|||||||
defer close(stopCh)
|
defer close(stopCh)
|
||||||
defer close(watchCh)
|
defer close(watchCh)
|
||||||
|
|
||||||
for {
|
safe.Go(func() {
|
||||||
select {
|
for index := range watchCh {
|
||||||
case <-stop:
|
|
||||||
return nil
|
|
||||||
case index, ok := <-watchCh:
|
|
||||||
if !ok {
|
|
||||||
return errors.New("consul service list nil")
|
|
||||||
}
|
|
||||||
log.Debug("List of services changed")
|
log.Debug("List of services changed")
|
||||||
nodes, err := p.getNodes(index)
|
nodes, err := p.getNodes(index)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -174,6 +167,13 @@ func (p *Provider) watch(configurationChan chan<- types.ConfigMessage, stop chan
|
|||||||
ProviderName: "consul_catalog",
|
ProviderName: "consul_catalog",
|
||||||
Configuration: configuration,
|
Configuration: configuration,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case <-stop:
|
||||||
|
return nil
|
||||||
case err := <-errorCh:
|
case err := <-errorCh:
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user