Skip to content
This repository was archived by the owner on Sep 25, 2020. It is now read-only.

Commit 6936ad4

Browse files
author
Nils Dijk
committed
Add explanation of the discovery to help/readme.
1 parent 40d0181 commit 6936ad4

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,38 @@ Command-line tools for Ringpop
2828
2929
-h, --help output usage information
3030
-V, --version output the version number
31+
32+
Discovery:
33+
34+
Most of the commands can discover the ring via
35+
a discoverUri like this: 'ringpop://127.0.0.1:3000'.
36+
If no protocol is specified 'ringpop://' will be
37+
used.
38+
39+
Supported protocols are:
40+
41+
- ringpop://
42+
Discover the ring by connecting to a host of
43+
the ring.
44+
45+
Example: ringpop://127.0.0.1:3000
46+
47+
- file://
48+
Discover the ring by reading a json file
49+
containing an array of host:port combinations
50+
51+
Example: file:///absolute/path/to/file
52+
Example: file://./relative/path
53+
File content: ["127.0.0.1:3000"]
54+
55+
- hyperbahn://
56+
Discover the ring by querying hyperbahn for
57+
the members of a service. When no hyperbahn
58+
ip and port are given 127.0.0.1:21300 will be
59+
used.
60+
61+
Example: hyperbahn:///ringpop
62+
Example: hyperbahn://hyperbahn-ip:port/ringpop
3163
```
3264

3365
## Tests

ringpop-admin.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,40 @@ function main() {
3838
.command('status', 'Status of members in ring')
3939
.command('partitions', 'Show partition information of a ring')
4040
.command('top', 'General membership information')
41+
.on('--help', function onHelp() {
42+
console.log(' Discovery:');
43+
console.log('');
44+
console.log(' Most of the commands can discover the ring via');
45+
console.log(' a discoverUri like this: \'ringpop://127.0.0.1:3000\'.');
46+
console.log(' If no protocol is specified \'ringpop://\' will be');
47+
console.log(' used.');
48+
console.log('');
49+
console.log(' Supported protocols are:');
50+
console.log('');
51+
console.log(' - ringpop://');
52+
console.log(' Discover the ring by connecting to a host of');
53+
console.log(' the ring.');
54+
console.log('');
55+
console.log(' Example: ringpop://127.0.0.1:3000');
56+
console.log('');
57+
console.log(' - file://');
58+
console.log(' Discover the ring by reading a json file');
59+
console.log(' containing an array of host:port combinations');
60+
console.log('');
61+
console.log(' Example: file:///absolute/path/to/file');
62+
console.log(' Example: file://./relative/path');
63+
console.log(' File content: ["127.0.0.1:3000"]');
64+
console.log('');
65+
console.log(' - hyperbahn://');
66+
console.log(' Discover the ring by querying hyperbahn for');
67+
console.log(' the members of a service. When no hyperbahn');
68+
console.log(' ip and port are given 127.0.0.1:21300 will be');
69+
console.log(' used.');
70+
console.log('');
71+
console.log(' Example: hyperbahn:///ringpop');
72+
console.log(' Example: hyperbahn://hyperbahn-ip:port/ringpop');
73+
console.log('');
74+
})
4175
.parse(process.argv);
4276
}
4377

tests/ringpop-admin.t

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,35 @@ Help:
3333
-h, --help output usage information
3434
-V, --version output the version number
3535

36+
Discovery:
37+
38+
Most of the commands can discover the ring via
39+
a discoverUri like this: 'ringpop://127.0.0.1:3000'.
40+
If no protocol is specified 'ringpop://' will be
41+
used.
42+
43+
Supported protocols are:
44+
45+
- ringpop://
46+
Discover the ring by connecting to a host of
47+
the ring.
48+
49+
Example: ringpop://127.0.0.1:3000
50+
51+
- file://
52+
Discover the ring by reading a json file
53+
containing an array of host:port combinations
54+
55+
Example: file:///absolute/path/to/file
56+
Example: file://./relative/path
57+
File content: ["127.0.0.1:3000"]
58+
59+
- hyperbahn://
60+
Discover the ring by querying hyperbahn for
61+
the members of a service. When no hyperbahn
62+
ip and port are given 127.0.0.1:21300 will be
63+
used.
64+
65+
Example: hyperbahn:///ringpop
66+
Example: hyperbahn://hyperbahn-ip:port/ringpop
67+

0 commit comments

Comments
 (0)