Skip to content

Commit

Permalink
Merge pull request #516 from brotherlogic/fix_lfdial
Browse files Browse the repository at this point in the history
Fix name of discovery
  • Loading branch information
brotherlogic committed Jul 23, 2020
2 parents 4e3832f + 18123ef commit c1e6872
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions comms.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

// FDialServer dial a specific job
func (s *GoServer) FDialServer(ctx context.Context, servername string) (*grpc.ClientConn, error) {
if servername == "discover" {
if servername == "discovery" {
return s.FDial(fmt.Sprintf("%v:%v", utils.LocalIP, utils.RegistryPort))
}

Expand All @@ -36,7 +36,7 @@ func (s *GoServer) FDialServer(ctx context.Context, servername string) (*grpc.Cl

// FFind finds all servers
func (s *GoServer) FFind(ctx context.Context, servername string) ([]string, error) {
if servername == "discover" {
if servername == "discovery" {
return []string{}, fmt.Errorf("Cannot multi dial discovery")
}

Expand All @@ -62,7 +62,7 @@ func (s *GoServer) FFind(ctx context.Context, servername string) ([]string, erro

// FDialSpecificServer dial a specific job on a specific host
func (s *GoServer) FDialSpecificServer(ctx context.Context, servername string, host string) (*grpc.ClientConn, error) {
if servername == "discover" {
if servername == "discovery" {
return s.FDial(fmt.Sprintf("%v:%v", utils.LocalIP, utils.RegistryPort))
}

Expand Down
2 changes: 1 addition & 1 deletion goserverapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ func (s *GoServer) Elect() (func(), error) {
return rf, err
}

//Elect elect me
//ElectKey elect me with a key
func (s *GoServer) ElectKey(key string) (func(), error) {
elected := make(chan error)
complete := make(chan bool)
Expand Down

0 comments on commit c1e6872

Please sign in to comment.