Permalink
Browse files

Reserve @names (mapped as /@).

I did have "master" as an invalid node name.  Instead, I don't think
we want a master node as much as services that are global and are
registered using a global service registry function.
  • Loading branch information...
1 parent 653e3f8 commit 3edb06008e34f4b431cd34df1daba01fd983ada5 @dustin dustin committed Sep 16, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −3 registry.go
  2. +3 −1 registry_test.go
View
4 registry.go
@@ -14,9 +14,7 @@ func validateServerId(s string) error {
switch {
case len(s) == 0:
return invalid
- case s == "master":
- return invalid
- case s[0] == '/':
+ case s[0] == '/' || s[0] == '@':
return invalid
}
return nil
View
4 registry_test.go
@@ -8,9 +8,11 @@ func TestServerIDValidation(t *testing.T) {
tests := map[string]bool{
"": false,
"/": false,
+ "/@thing": false,
+ "@thing": false,
"/something": false,
+ "master": true,
"something": true,
- "master": false,
}
for testId, shouldBeOK := range tests {

0 comments on commit 3edb060

Please sign in to comment.