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
46
api/netmap/grpc/service_grpc.pb.go
generated
46
api/netmap/grpc/service_grpc.pb.go
generated
|
@ -1,7 +1,7 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v5.27.2
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.29.2
|
||||
// source: api/netmap/grpc/service.proto
|
||||
|
||||
package netmap
|
||||
|
@ -15,8 +15,8 @@ import (
|
|||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
NetmapService_LocalNodeInfo_FullMethodName = "/neo.fs.v2.netmap.NetmapService/LocalNodeInfo"
|
||||
|
@ -27,6 +27,11 @@ const (
|
|||
// NetmapServiceClient is the client API for NetmapService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
//
|
||||
// `NetmapService` provides methods to work with `Network Map` and the
|
||||
// information required to build it. The resulting `Network Map` is stored in
|
||||
// sidechain `Netmap` smart contract, while related information can be obtained
|
||||
// from other FrostFS nodes.
|
||||
type NetmapServiceClient interface {
|
||||
// Get NodeInfo structure from the particular node directly.
|
||||
// Node information can be taken from `Netmap` smart contract. In some cases,
|
||||
|
@ -65,8 +70,9 @@ func NewNetmapServiceClient(cc grpc.ClientConnInterface) NetmapServiceClient {
|
|||
}
|
||||
|
||||
func (c *netmapServiceClient) LocalNodeInfo(ctx context.Context, in *LocalNodeInfoRequest, opts ...grpc.CallOption) (*LocalNodeInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LocalNodeInfoResponse)
|
||||
err := c.cc.Invoke(ctx, NetmapService_LocalNodeInfo_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, NetmapService_LocalNodeInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -74,8 +80,9 @@ func (c *netmapServiceClient) LocalNodeInfo(ctx context.Context, in *LocalNodeIn
|
|||
}
|
||||
|
||||
func (c *netmapServiceClient) NetworkInfo(ctx context.Context, in *NetworkInfoRequest, opts ...grpc.CallOption) (*NetworkInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(NetworkInfoResponse)
|
||||
err := c.cc.Invoke(ctx, NetmapService_NetworkInfo_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, NetmapService_NetworkInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -83,8 +90,9 @@ func (c *netmapServiceClient) NetworkInfo(ctx context.Context, in *NetworkInfoRe
|
|||
}
|
||||
|
||||
func (c *netmapServiceClient) NetmapSnapshot(ctx context.Context, in *NetmapSnapshotRequest, opts ...grpc.CallOption) (*NetmapSnapshotResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(NetmapSnapshotResponse)
|
||||
err := c.cc.Invoke(ctx, NetmapService_NetmapSnapshot_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, NetmapService_NetmapSnapshot_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -93,7 +101,12 @@ func (c *netmapServiceClient) NetmapSnapshot(ctx context.Context, in *NetmapSnap
|
|||
|
||||
// NetmapServiceServer is the server API for NetmapService service.
|
||||
// All implementations should embed UnimplementedNetmapServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// `NetmapService` provides methods to work with `Network Map` and the
|
||||
// information required to build it. The resulting `Network Map` is stored in
|
||||
// sidechain `Netmap` smart contract, while related information can be obtained
|
||||
// from other FrostFS nodes.
|
||||
type NetmapServiceServer interface {
|
||||
// Get NodeInfo structure from the particular node directly.
|
||||
// Node information can be taken from `Netmap` smart contract. In some cases,
|
||||
|
@ -123,9 +136,12 @@ type NetmapServiceServer interface {
|
|||
NetmapSnapshot(context.Context, *NetmapSnapshotRequest) (*NetmapSnapshotResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedNetmapServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedNetmapServiceServer struct {
|
||||
}
|
||||
// UnimplementedNetmapServiceServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedNetmapServiceServer struct{}
|
||||
|
||||
func (UnimplementedNetmapServiceServer) LocalNodeInfo(context.Context, *LocalNodeInfoRequest) (*LocalNodeInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LocalNodeInfo not implemented")
|
||||
|
@ -136,6 +152,7 @@ func (UnimplementedNetmapServiceServer) NetworkInfo(context.Context, *NetworkInf
|
|||
func (UnimplementedNetmapServiceServer) NetmapSnapshot(context.Context, *NetmapSnapshotRequest) (*NetmapSnapshotResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NetmapSnapshot not implemented")
|
||||
}
|
||||
func (UnimplementedNetmapServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeNetmapServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to NetmapServiceServer will
|
||||
|
@ -145,6 +162,13 @@ type UnsafeNetmapServiceServer interface {
|
|||
}
|
||||
|
||||
func RegisterNetmapServiceServer(s grpc.ServiceRegistrar, srv NetmapServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedNetmapServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&NetmapService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue