Skip to content

Commit fb9e39e

Browse files
authored
Merge pull request #251 from vasayxtx/export-client-name
Export method to get an unique name of the client
2 parents cd06e0f + c670274 commit fb9e39e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ func (c *Client) User() string {
235235
return c.namenode.User
236236
}
237237

238+
// Name returns the unique name that the Client uses in communication
239+
// with namenodes and datanodes.
240+
func (c *Client) Name() string {
241+
return c.namenode.ClientName
242+
}
243+
238244
// ReadFile reads the file named by filename and returns the contents.
239245
func (c *Client) ReadFile(filename string) ([]byte, error) {
240246
f, err := c.Open(filename)

0 commit comments

Comments
 (0)