Move accountant to it's own deployment using gRCP

This commit is contained in:
Marc Di Luzio 2020-06-10 23:23:09 +01:00
parent 8f25f55658
commit 99da6c5d67
14 changed files with 868 additions and 64 deletions

View file

@ -113,6 +113,9 @@ func InnerMain(command string) error {
}
case "register":
if len(*name) == 0 {
return fmt.Errorf("must set name with -name")
}
d := rove.RegisterData{
Name: *name,
}
@ -125,8 +128,8 @@ func InnerMain(command string) error {
return fmt.Errorf("Server returned failure: %s", response.Error)
default:
fmt.Printf("Registered account with id: %s\n", d.Name)
config.Accounts[config.Host] = d.Name
fmt.Printf("Registered account with id: %s\n", *name)
config.Accounts[config.Host] = *name
}
case "move":