Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e79c6e

Browse files
committed
Merge pull request #31 from mattmcclean/master
Updated Docker label format to be docker spec compliant
2 parents 1f1f73f + fa20e18 commit 4e79c6e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ With Resolvable running, it will have access to Consul DNS. It will be able to r
3737

3838
All you have to do is specify a port to use and what you'd like to connect to as a label. For example:
3939

40-
connect[6000]=redis.service.consul
40+
connect.6000=redis.service.consul
4141

4242
With this label set, you can connect to Redis on localhost:6000. You can also specify multiple services:
4343

4444
$ docker run -d --name myservice \
45-
-l connect[6000]=redis.service.consul \
46-
-l connect[3306]=master.mysql.service.consul \
45+
-l connect.6000=redis.service.consul \
46+
-l connect.3306=master.mysql.service.consul \
4747
example/myservice
4848

4949
## Load Balancing

connectable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func inspectBackend(sourceIP, destPort string) (string, error) {
8888
if err != nil {
8989
return "", err
9090
}
91-
label := fmt.Sprintf("connect[%s]", destPort)
91+
label := fmt.Sprintf("connect.%s", destPort)
9292

9393
// todo: cache, invalidate with container destroy events
9494
containers, err := client.ListContainers(docker.ListContainersOptions{})

0 commit comments

Comments
 (0)