forked from TrueCloudLab/frostfs-api-go
[#263] pkg/client: Refactor the client to use raw protobuf client
Make `Client` to be the wrapper over raw protobuf client. Provide public method to get the underlying raw client. Change implementations of all methods with the new approach of the RPC execution. Additional changes: * key replaced from `New` argument to `WithDefaultPrivateKey` option; * `GetSelfBalance` is removed as non-viable; * `GetEACLWithSignature` is removed, `GetEACL` returns `EACLWithSignature`; * `AttachSessionToken` / `AttachBearerToken` are removed as non-viable; * redundant options are removed. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
5a9dd7ab3f
commit
c819909906
9 changed files with 380 additions and 1068 deletions
14
pkg/client/raw.go
Normal file
14
pkg/client/raw.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/rpc/client"
|
||||
)
|
||||
|
||||
// Raw returns underlying raw protobuf client.
|
||||
func (c *clientImpl) Raw() *client.Client {
|
||||
c.onceInit.Do(func() {
|
||||
c.raw = client.New(c.opts.rawOpts...)
|
||||
})
|
||||
|
||||
return c.raw
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue