mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
e02d6acc7d
* save progress * try now * don't create bloom inside rlpDecode * don't create bloom inside ApplyTransaction * clean * clean * clean * clean * clean * clean * clean * clean * rename method * print timings * print timings * print timings * sort before flush * fix err lint * clean * move tests to transactions * compressed version * up bound * up bound * more tests * more tests * more tests * more tests * better removal * clean * better performance of get/put methods * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * optimize rpcdaemon * fix test * fix rpcdaemon * fix test * simplify * simplify * fix nil pointer * clean * revert some changes * add some logs * clean * try without optimize * clean * clean * clean * clean * try * move log_index to own stage * move log_index to own stage * integration add log_index stage * integration add log_index stage * clean * clean * print timing * remove duplicates at unwind * extract truncateBitmaps func * try detect * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * clean * add blackList of topics * clean * clean * clean * clean * clean * clean * clean * clean * sharding 1 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 2 * sharded 3 * sharded 3 * sharded 3 * speedup things by putCurrent and putReserve * clean * optimize trim * clean * remove blacklist * add more info to err * ? * clean * clean * clean * clean * clean * working version * switch to cgo version of roaring bitmaps * clean * clean * clean * clean * more docs * clean * clean * fix logs bloom field * Fix debug_getModifiedAccountsByNumber * Try to fix crash * fix problem with "absent block" * fix problem with "absent block" * remove optimize method call * remove roaring iterator * fix problem with rebuild indicess * remove debug prints * tests for eth_getLogs involving topics * add tests for new stage, speparate topics into 2 buckets * version up * remove debug logs * remove debug logs * remove bloom filter implementation * Optimisation * Optimisatin not required, make rpctest lenient to geth errors * Lenient to geth failures Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
157 lines
5.0 KiB
Go
157 lines
5.0 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package remote
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// KVClient is the client API for KV 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.
|
|
type KVClient interface {
|
|
// open a cursor on given position of given bucket
|
|
// if streaming requested - streams all data: stops if client's buffer is full, resumes when client read enough from buffer
|
|
// if streaming not requested - streams next data only when clients sends message to bi-directional channel
|
|
// no full consistency guarantee - server implementation can close/open underlying db transaction at any time
|
|
Seek(ctx context.Context, opts ...grpc.CallOption) (KV_SeekClient, error)
|
|
}
|
|
|
|
type kVClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewKVClient(cc grpc.ClientConnInterface) KVClient {
|
|
return &kVClient{cc}
|
|
}
|
|
|
|
var kVSeekStreamDesc = &grpc.StreamDesc{
|
|
StreamName: "Seek",
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
}
|
|
|
|
func (c *kVClient) Seek(ctx context.Context, opts ...grpc.CallOption) (KV_SeekClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, kVSeekStreamDesc, "/remote.KV/Seek", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &kVSeekClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type KV_SeekClient interface {
|
|
Send(*SeekRequest) error
|
|
Recv() (*Pair, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type kVSeekClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *kVSeekClient) Send(m *SeekRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *kVSeekClient) Recv() (*Pair, error) {
|
|
m := new(Pair)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// KVService is the service API for KV service.
|
|
// Fields should be assigned to their respective handler implementations only before
|
|
// RegisterKVService is called. Any unassigned fields will result in the
|
|
// handler for that method returning an Unimplemented error.
|
|
type KVService struct {
|
|
// open a cursor on given position of given bucket
|
|
// if streaming requested - streams all data: stops if client's buffer is full, resumes when client read enough from buffer
|
|
// if streaming not requested - streams next data only when clients sends message to bi-directional channel
|
|
// no full consistency guarantee - server implementation can close/open underlying db transaction at any time
|
|
Seek func(KV_SeekServer) error
|
|
}
|
|
|
|
func (s *KVService) seek(_ interface{}, stream grpc.ServerStream) error {
|
|
if s.Seek == nil {
|
|
return status.Errorf(codes.Unimplemented, "method Seek not implemented")
|
|
}
|
|
return s.Seek(&kVSeekServer{stream})
|
|
}
|
|
|
|
type KV_SeekServer interface {
|
|
Send(*Pair) error
|
|
Recv() (*SeekRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type kVSeekServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *kVSeekServer) Send(m *Pair) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *kVSeekServer) Recv() (*SeekRequest, error) {
|
|
m := new(SeekRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// RegisterKVService registers a service implementation with a gRPC server.
|
|
func RegisterKVService(s grpc.ServiceRegistrar, srv *KVService) {
|
|
sd := grpc.ServiceDesc{
|
|
ServiceName: "remote.KV",
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Seek",
|
|
Handler: srv.seek,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "remote/kv.proto",
|
|
}
|
|
|
|
s.RegisterService(&sd, nil)
|
|
}
|
|
|
|
// NewKVService creates a new KVService containing the
|
|
// implemented methods of the KV service in s. Any unimplemented
|
|
// methods will result in the gRPC server returning an UNIMPLEMENTED status to the client.
|
|
// This includes situations where the method handler is misspelled or has the wrong
|
|
// signature. For this reason, this function should be used with great care and
|
|
// is not recommended to be used by most users.
|
|
func NewKVService(s interface{}) *KVService {
|
|
ns := &KVService{}
|
|
if h, ok := s.(interface{ Seek(KV_SeekServer) error }); ok {
|
|
ns.Seek = h.Seek
|
|
}
|
|
return ns
|
|
}
|
|
|
|
// UnstableKVService is the service API for KV service.
|
|
// New methods may be added to this interface if they are added to the service
|
|
// definition, which is not a backward-compatible change. For this reason,
|
|
// use of this type is not recommended.
|
|
type UnstableKVService interface {
|
|
// open a cursor on given position of given bucket
|
|
// if streaming requested - streams all data: stops if client's buffer is full, resumes when client read enough from buffer
|
|
// if streaming not requested - streams next data only when clients sends message to bi-directional channel
|
|
// no full consistency guarantee - server implementation can close/open underlying db transaction at any time
|
|
Seek(KV_SeekServer) error
|
|
}
|