forked from TrueCloudLab/frostfs-sdk-go
[#131] client: Switch ResolveFrostFSFailures to DontResolveFrostFSFailures option
Signed-off-by: Egor Olefirenko <egor.olefirenko892@gmail.com>
This commit is contained in:
parent
84315fab6a
commit
9727beb47d
17 changed files with 58 additions and 58 deletions
|
@ -144,7 +144,7 @@ func (c *Client) Close() error {
|
|||
//
|
||||
// See also Init.
|
||||
type PrmInit struct {
|
||||
resolveFrostFSErrors bool
|
||||
dontResolveFrostFSErrors bool
|
||||
|
||||
key ecdsa.PrivateKey
|
||||
|
||||
|
@ -161,12 +161,12 @@ func (x *PrmInit) SetDefaultPrivateKey(key ecdsa.PrivateKey) {
|
|||
x.key = key
|
||||
}
|
||||
|
||||
// ResolveFrostFSFailures makes the Client to resolve failure statuses of the
|
||||
// FrostFS protocol into Go built-in errors. These errors are returned from
|
||||
// each protocol operation. By default, statuses aren't resolved and written
|
||||
// to the resulting structure (see corresponding Res* docs).
|
||||
func (x *PrmInit) ResolveFrostFSFailures() {
|
||||
x.resolveFrostFSErrors = true
|
||||
// DontResolveFrostFSFailures makes the Client to preserve failure statuses of the
|
||||
// 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.
|
||||
func (x *PrmInit) DontResolveFrostFSFailures() {
|
||||
x.dontResolveFrostFSErrors = true
|
||||
}
|
||||
|
||||
// SetResponseInfoCallback makes the Client to pass ResponseMetaInfo from each
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue