forked from TrueCloudLab/frostfs-node
[#932] adm: Prepare to move InitializeContext
to util
package
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
bee3741f4e
commit
b68f7be0b6
20 changed files with 277 additions and 270 deletions
|
@ -29,11 +29,11 @@ func removeNodesCmd(cmd *cobra.Command, args []string) error {
|
|||
}
|
||||
}
|
||||
|
||||
wCtx, err := newInitializeContext(cmd, viper.GetViper())
|
||||
wCtx, err := NewInitializeContext(cmd, viper.GetViper())
|
||||
if err != nil {
|
||||
return fmt.Errorf("can't initialize context: %w", err)
|
||||
}
|
||||
defer wCtx.close()
|
||||
defer wCtx.Close()
|
||||
|
||||
r := management.NewReader(wCtx.ReadOnlyInvoker)
|
||||
cs, err := r.GetContractByID(1)
|
||||
|
@ -56,9 +56,9 @@ func removeNodesCmd(cmd *cobra.Command, args []string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if err := wCtx.sendConsensusTx(bw.Bytes()); err != nil {
|
||||
if err := wCtx.SendConsensusTx(bw.Bytes()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return wCtx.awaitTx()
|
||||
return wCtx.AwaitTx()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue