forked from TrueCloudLab/frostfs-sdk-go
[#189] client: Make PrmInit fields public for client
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
ab75edd709
commit
e91d40e250
21 changed files with 55 additions and 46 deletions
|
@ -144,21 +144,23 @@ func (c *Client) Close() error {
|
|||
//
|
||||
// See also Init.
|
||||
type PrmInit struct {
|
||||
disableFrostFSErrorResolution bool
|
||||
DisableFrostFSErrorResolution bool
|
||||
|
||||
key ecdsa.PrivateKey
|
||||
Key ecdsa.PrivateKey
|
||||
|
||||
cbRespInfo func(ResponseMetaInfo) error
|
||||
ResponseInfoCallback func(ResponseMetaInfo) error
|
||||
|
||||
netMagic uint64
|
||||
NetMagic uint64
|
||||
}
|
||||
|
||||
// SetDefaultPrivateKey sets Client private key to be used for the protocol
|
||||
// communication by default.
|
||||
//
|
||||
// Required for operations without custom key parametrization (see corresponding Prm* docs).
|
||||
//
|
||||
// Deprecated: Use PrmInit.Key instead.
|
||||
func (x *PrmInit) SetDefaultPrivateKey(key ecdsa.PrivateKey) {
|
||||
x.key = key
|
||||
x.Key = key
|
||||
}
|
||||
|
||||
// Deprecated: method is no-op. Option is default.
|
||||
|
@ -169,14 +171,18 @@ func (x *PrmInit) ResolveFrostFSFailures() {
|
|||
// FrostFS protocol only in resulting structure (see corresponding Res* docs).
|
||||
// These errors are returned from each protocol operation. By default, statuses
|
||||
// are resolved and returned as a Go built-in errors.
|
||||
//
|
||||
// Deprecated: Use PrmInit.DisableFrostFSErrorResolution instead.
|
||||
func (x *PrmInit) DisableFrostFSFailuresResolution() {
|
||||
x.disableFrostFSErrorResolution = true
|
||||
x.DisableFrostFSErrorResolution = true
|
||||
}
|
||||
|
||||
// SetResponseInfoCallback makes the Client to pass ResponseMetaInfo from each
|
||||
// FrostFS server response to f. Nil (default) means ignore response meta info.
|
||||
//
|
||||
// Deprecated: Use PrmInit.ResponseInfoCallback instead.
|
||||
func (x *PrmInit) SetResponseInfoCallback(f func(ResponseMetaInfo) error) {
|
||||
x.cbRespInfo = f
|
||||
x.ResponseInfoCallback = f
|
||||
}
|
||||
|
||||
// PrmDial groups connection parameters for the Client.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue