forked from TrueCloudLab/frostfs-node
[#677] client: Refactor PrmAnnounceSpace/EndpointInfo/NetworkInfo usage
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
8a81af5a3b
commit
aa9f8dce3d
8 changed files with 24 additions and 20 deletions
|
@ -224,8 +224,8 @@ func SetEACL(ctx context.Context, prm SetEACLPrm) (res SetEACLRes, err error) {
|
|||
|
||||
// NetworkInfoPrm groups parameters of NetworkInfo operation.
|
||||
type NetworkInfoPrm struct {
|
||||
commonPrm
|
||||
client.PrmNetworkInfo
|
||||
Client *client.Client
|
||||
ClientParams client.PrmNetworkInfo
|
||||
}
|
||||
|
||||
// NetworkInfoRes groups the resulting values of NetworkInfo operation.
|
||||
|
@ -242,15 +242,15 @@ func (x NetworkInfoRes) NetworkInfo() netmap.NetworkInfo {
|
|||
//
|
||||
// Returns any error which prevented the operation from completing correctly in error return.
|
||||
func NetworkInfo(ctx context.Context, prm NetworkInfoPrm) (res NetworkInfoRes, err error) {
|
||||
res.cliRes, err = prm.cli.NetworkInfo(ctx, prm.PrmNetworkInfo)
|
||||
res.cliRes, err = prm.Client.NetworkInfo(ctx, prm.ClientParams)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// NodeInfoPrm groups parameters of NodeInfo operation.
|
||||
type NodeInfoPrm struct {
|
||||
commonPrm
|
||||
client.PrmEndpointInfo
|
||||
Client *client.Client
|
||||
ClientParams client.PrmEndpointInfo
|
||||
}
|
||||
|
||||
// NodeInfoRes groups the resulting values of NodeInfo operation.
|
||||
|
@ -272,7 +272,7 @@ func (x NodeInfoRes) LatestVersion() version.Version {
|
|||
//
|
||||
// Returns any error which prevented the operation from completing correctly in error return.
|
||||
func NodeInfo(ctx context.Context, prm NodeInfoPrm) (res NodeInfoRes, err error) {
|
||||
res.cliRes, err = prm.cli.EndpointInfo(ctx, prm.PrmEndpointInfo)
|
||||
res.cliRes, err = prm.Client.EndpointInfo(ctx, prm.ClientParams)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue