forked from TrueCloudLab/frostfs-sdk-go
[#317] api: Revert easyproto marshaler usage
It has caused a noticeable degradation in node. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
bab4d5a692
commit
328d214d2d
110 changed files with 47773 additions and 37555 deletions
|
@ -14,12 +14,10 @@ func (x Clause) String() string {
|
|||
//
|
||||
// Returns true if s was parsed successfully.
|
||||
func (x *Clause) FromString(s string) bool {
|
||||
var g netmap.Clause
|
||||
|
||||
ok := g.FromString(s)
|
||||
g, ok := netmap.Clause_value[s]
|
||||
|
||||
if ok {
|
||||
*x = ClauseFromGRPCMessage(g)
|
||||
*x = ClauseFromGRPCMessage(netmap.Clause(g))
|
||||
}
|
||||
|
||||
return ok
|
||||
|
@ -35,12 +33,10 @@ func (x Operation) String() string {
|
|||
//
|
||||
// Returns true if s was parsed successfully.
|
||||
func (x *Operation) FromString(s string) bool {
|
||||
var g netmap.Operation
|
||||
|
||||
ok := g.FromString(s)
|
||||
g, ok := netmap.Operation_value[s]
|
||||
|
||||
if ok {
|
||||
*x = OperationFromGRPCMessage(g)
|
||||
*x = OperationFromGRPCMessage(netmap.Operation(g))
|
||||
}
|
||||
|
||||
return ok
|
||||
|
@ -56,12 +52,10 @@ func (x NodeState) String() string {
|
|||
//
|
||||
// Returns true if s was parsed successfully.
|
||||
func (x *NodeState) FromString(s string) bool {
|
||||
var g netmap.NodeInfo_State
|
||||
|
||||
ok := g.FromString(s)
|
||||
g, ok := netmap.NodeInfo_State_value[s]
|
||||
|
||||
if ok {
|
||||
*x = NodeStateFromRPCMessage(g)
|
||||
*x = NodeStateFromRPCMessage(netmap.NodeInfo_State(g))
|
||||
}
|
||||
|
||||
return ok
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue