forked from TrueCloudLab/frostfs-sdk-go
[#164] client: Refactor and document package functionality
Get rid of `Option` pattern. Define `Init`, `Dial` and `Close` methods for the corresponding stages of use. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
df5c69eea5
commit
22dad0573d
18 changed files with 316 additions and 265 deletions
|
@ -18,11 +18,3 @@ type responseV2 interface {
|
|||
func (x ResponseMetaInfo) ResponderKey() []byte {
|
||||
return x.key
|
||||
}
|
||||
|
||||
// WithResponseInfoHandler allows specifying handler of response meta information for the all Client operations.
|
||||
// The handler is called right after the response is received. Client returns handler's error immediately.
|
||||
func WithResponseInfoHandler(f func(ResponseMetaInfo) error) Option {
|
||||
return func(opts *clientOptions) {
|
||||
opts.cbRespInfo = f
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue