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,9 @@ func (x Action) String() string {
|
|||
//
|
||||
// Returns true if s was parsed successfully.
|
||||
func (x *Action) FromString(s string) bool {
|
||||
var g acl.Action
|
||||
|
||||
ok := g.FromString(s)
|
||||
|
||||
g, ok := acl.Action_value[s]
|
||||
if ok {
|
||||
*x = ActionFromGRPCField(g)
|
||||
*x = ActionFromGRPCField(acl.Action(g))
|
||||
}
|
||||
|
||||
return ok
|
||||
|
@ -35,12 +32,10 @@ func (x Role) String() string {
|
|||
//
|
||||
// Returns true if s was parsed successfully.
|
||||
func (x *Role) FromString(s string) bool {
|
||||
var g acl.Role
|
||||
|
||||
ok := g.FromString(s)
|
||||
g, ok := acl.Role_value[s]
|
||||
|
||||
if ok {
|
||||
*x = RoleFromGRPCField(g)
|
||||
*x = RoleFromGRPCField(acl.Role(g))
|
||||
}
|
||||
|
||||
return ok
|
||||
|
@ -56,12 +51,9 @@ func (x Operation) String() string {
|
|||
//
|
||||
// Returns true if s was parsed successfully.
|
||||
func (x *Operation) FromString(s string) bool {
|
||||
var g acl.Operation
|
||||
|
||||
ok := g.FromString(s)
|
||||
|
||||
g, ok := acl.Operation_value[s]
|
||||
if ok {
|
||||
*x = OperationFromGRPCField(g)
|
||||
*x = OperationFromGRPCField(acl.Operation(g))
|
||||
}
|
||||
|
||||
return ok
|
||||
|
@ -77,12 +69,10 @@ func (x MatchType) String() string {
|
|||
//
|
||||
// Returns true if s was parsed successfully.
|
||||
func (x *MatchType) FromString(s string) bool {
|
||||
var g acl.MatchType
|
||||
|
||||
ok := g.FromString(s)
|
||||
g, ok := acl.MatchType_value[s]
|
||||
|
||||
if ok {
|
||||
*x = MatchTypeFromGRPCField(g)
|
||||
*x = MatchTypeFromGRPCField(acl.MatchType(g))
|
||||
}
|
||||
|
||||
return ok
|
||||
|
@ -98,12 +88,10 @@ func (x HeaderType) String() string {
|
|||
//
|
||||
// Returns true if s was parsed successfully.
|
||||
func (x *HeaderType) FromString(s string) bool {
|
||||
var g acl.HeaderType
|
||||
|
||||
ok := g.FromString(s)
|
||||
g, ok := acl.HeaderType_value[s]
|
||||
|
||||
if ok {
|
||||
*x = HeaderTypeFromGRPCField(g)
|
||||
*x = HeaderTypeFromGRPCField(acl.HeaderType(g))
|
||||
}
|
||||
|
||||
return ok
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue