Skip to content

Commit

Permalink
Deprecate NewForUser and NewForConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmarc committed Jan 23, 2018
1 parent 1db86c7 commit 0f30457
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ func getNameNodeFromConf() ([]string, error) {

// NewForUser returns a connected Client with the user specified, or an error if
// it can't connect.
//
// Deprecated: Use NewClient with ClientOptions instead.
func NewForUser(address string, user string) (*Client, error) {
return NewClient(ClientOptions{
Addresses: []string{address},
Expand All @@ -107,6 +109,8 @@ func NewForUser(address string, user string) (*Client, error) {

// NewForConnection returns Client with the specified, underlying rpc.NamenodeConnection.
// You can use rpc.WrapNamenodeConnection to wrap your own net.Conn.
//
// Deprecated: Use NewClient with ClientOptions instead.
func NewForConnection(namenode *rpc.NamenodeConnection) *Client {
client, _ := NewClient(ClientOptions{Namenode: namenode})
return client
Expand Down

0 comments on commit 0f30457

Please sign in to comment.