Skip to content

Commit

Permalink
util: add GetAddrs method
Browse files Browse the repository at this point in the history
added GetAddrs to get the client
Adress of the rados connection
which is helpful for NetworkFencing

Signed-off-by: Madhu Rajanna <[email protected]>
  • Loading branch information
Madhu-1 committed Nov 4, 2024
1 parent 9fcce79 commit 73bb35c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/util/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,13 @@ func (cc *ClusterConnection) GetNFSAdmin() (*nfs.Admin, error) {

return nfs.NewFromConn(cc.conn), nil
}

// GetAddrs returns the addresses of the RADOS session,
// suitable for blocklisting.
func (cc *ClusterConnection) GetAddrs() (string, error) {
if cc.conn == nil {
return "", errors.New("cluster is not connected yet")
}

return cc.conn.GetAddrs()
}

0 comments on commit 73bb35c

Please sign in to comment.