diff --git a/client_config.go b/client_config.go index 7e5abe5..6abc7ef 100644 --- a/client_config.go +++ b/client_config.go @@ -31,6 +31,12 @@ func DefaultClientConfig() *ClientConfig { } } +func WithClientServerAddress(addr string) ClientConfigFunc { + return func(conf *ClientConfig) { + conf.ServerAddress = addr + } +} + func WithClientCredentials(credentials interface{}) ClientConfigFunc { return func(conf *ClientConfig) { conf.Credentials = credentials diff --git a/server_config.go b/server_config.go index e4113f7..f1267be 100644 --- a/server_config.go +++ b/server_config.go @@ -37,6 +37,12 @@ func DefaultServerConfig() *ServerConfig { type ServerConfigFunc func(c *ServerConfig) +func WithServerAddress(address string) ServerConfigFunc { + return func(conf *ServerConfig) { + conf.Address = address + } +} + func WithServerAESBlockCrypt(pass, salt string) ServerConfigFunc { return func(conf *ServerConfig) { key := pbkdf2.Key([]byte(pass), []byte(salt), 1024, 32, sha1.New)