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
40
api/session/grpc/service_grpc.pb.go
generated
40
api/session/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/session/grpc/service.proto
|
||||
|
||||
package session
|
||||
|
@ -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 (
|
||||
SessionService_Create_FullMethodName = "/neo.fs.v2.session.SessionService/Create"
|
||||
|
@ -25,6 +25,11 @@ const (
|
|||
// SessionServiceClient is the client API for SessionService 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.
|
||||
//
|
||||
// `SessionService` allows to establish a temporary trust relationship between
|
||||
// two peer nodes and generate a `SessionToken` as the proof of trust to be
|
||||
// attached in requests for further verification. Please see corresponding
|
||||
// section of FrostFS Technical Specification for details.
|
||||
type SessionServiceClient interface {
|
||||
// Open a new session between two peers.
|
||||
//
|
||||
|
@ -44,8 +49,9 @@ func NewSessionServiceClient(cc grpc.ClientConnInterface) SessionServiceClient {
|
|||
}
|
||||
|
||||
func (c *sessionServiceClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateResponse)
|
||||
err := c.cc.Invoke(ctx, SessionService_Create_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, SessionService_Create_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -54,7 +60,12 @@ func (c *sessionServiceClient) Create(ctx context.Context, in *CreateRequest, op
|
|||
|
||||
// SessionServiceServer is the server API for SessionService service.
|
||||
// All implementations should embed UnimplementedSessionServiceServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
//
|
||||
// `SessionService` allows to establish a temporary trust relationship between
|
||||
// two peer nodes and generate a `SessionToken` as the proof of trust to be
|
||||
// attached in requests for further verification. Please see corresponding
|
||||
// section of FrostFS Technical Specification for details.
|
||||
type SessionServiceServer interface {
|
||||
// Open a new session between two peers.
|
||||
//
|
||||
|
@ -65,13 +76,17 @@ type SessionServiceServer interface {
|
|||
Create(context.Context, *CreateRequest) (*CreateResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedSessionServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedSessionServiceServer struct {
|
||||
}
|
||||
// UnimplementedSessionServiceServer 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 UnimplementedSessionServiceServer struct{}
|
||||
|
||||
func (UnimplementedSessionServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedSessionServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSessionServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SessionServiceServer will
|
||||
|
@ -81,6 +96,13 @@ type UnsafeSessionServiceServer interface {
|
|||
}
|
||||
|
||||
func RegisterSessionServiceServer(s grpc.ServiceRegistrar, srv SessionServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedSessionServiceServer 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(&SessionService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue