add advertise grpc address option
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
4bc08c92c2
commit
190ec3130d
12 changed files with 415 additions and 204 deletions
|
@ -28,15 +28,7 @@ import (
|
|||
)
|
||||
|
||||
// Join attempts to connect to the peer and returns the master info
|
||||
func (c *Client) Join(key string) (*v1.Master, error) {
|
||||
func (c *Client) Join(req *v1.JoinRequest) (*v1.JoinResponse, error) {
|
||||
ctx := context.Background()
|
||||
resp, err := c.heimdallClient.Join(ctx, &v1.JoinRequest{
|
||||
ID: c.id,
|
||||
ClusterKey: key,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp.Master, nil
|
||||
return c.heimdallClient.Join(ctx, req)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue