Created
September 17, 2014 16:44
-
-
Save anandkunal/eaff392b18a0ad376f0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ( | |
Client struct { | |
connection *rpc.Client | |
} | |
) | |
func NewClient(dsn string, timeout time.Duration) (*Client, error) { | |
connection, err := net.DialTimeout("tcp", dsn, timeout) | |
if err != nil { | |
return nil, err | |
} | |
return &Client{connection: rpc.NewClient(connection)}, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment