mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-26 05:27:19 +00:00
e3f3dd3c9b
* Initial commit * Add sentry gRPC interface * p2psentry directory * Update README.md * Update README.md * Update README.md * Add go package * Correct syntax * add external downloader interface (#2) * Add txpool (#3) * Add private API (#4) * Invert control.proto, add PeerMinBlock, Separare incoming Tx message into a separate stream (#5) Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Separate upload messages into its own stream (#6) Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Only send changed accounts to listeners (#7) * Txpool interface doc (#9) * Add architecture diagram source and picture (#10) * Typed hashes (#11) * Typed hashes * Fix PeerId * 64-bit tx nonce * Add proper golang packages, max_block into p2p sentry Status (#12) * Add proper golang packages, max_block into p2p sentry Status * Change EtherReply to address Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Add Rust infrastructure (#13) * DB stats methods removed by https://github.com/ledgerwatch/turbo-geth/pull/1665 * more p2p methods (#15) * add mining methods (#16) * First draft of Consensus gRPC interface (#14) * Update Rust build * Fix interfaces in architecture diagram (#17) * Fix KV interface provider * Fix Consensus interface provider * drop java attributes (#18) * tx pool remove unused import (#19) * ethbackend: add protocol version and client version (#20) * Add missing ethbackend I/F (#21) * Add interface versioning mechanism (#23) Add versioning in KV interface Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me> * spec of tx pool method (#24) * spec of tx pool method (#25) * Update version.proto * Refactor interface versioning * Refactor interface versioning * Testing interface * Remove tree * Fix * Build testing protos * Fix * Fix * Update to the newer interfaces * Add ProtocolVersion and ClientVersion stubs * Hook up ProtocolVersion and ClientVersion * Remove service * Add compatibility checks for RPC daemon * Fix typos * Properly update DB schema version * Fix test * Add test for KV compatibility| * Info messages about compability for RPC daemon * DB schema version to be one key * Update release intructions Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me> Co-authored-by: b00ris <b00ris@mail.ru> Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com> Co-authored-by: canepat <16927169+canepat@users.noreply.github.com> Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com> Co-authored-by: canepat <tullio.canepa@gmail.com> Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
173 lines
5.9 KiB
Go
173 lines
5.9 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package testing
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// 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
|
|
|
|
// TestDriverClient is the client API for TestDriver 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 TestDriverClient interface {
|
|
// Returns number of available integration test caes in the test driver
|
|
TestCaseCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TestCaseNumber, error)
|
|
// Ask the test driver to start the test case with given number. As test case progresses, the driver sends reports via the stream
|
|
// Test drivier also notifies about the end of test case via the stream
|
|
StartTestCase(ctx context.Context, in *TestCaseNumber, opts ...grpc.CallOption) (TestDriver_StartTestCaseClient, error)
|
|
}
|
|
|
|
type testDriverClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewTestDriverClient(cc grpc.ClientConnInterface) TestDriverClient {
|
|
return &testDriverClient{cc}
|
|
}
|
|
|
|
func (c *testDriverClient) TestCaseCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TestCaseNumber, error) {
|
|
out := new(TestCaseNumber)
|
|
err := c.cc.Invoke(ctx, "/testing.TestDriver/TestCaseCount", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *testDriverClient) StartTestCase(ctx context.Context, in *TestCaseNumber, opts ...grpc.CallOption) (TestDriver_StartTestCaseClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &TestDriver_ServiceDesc.Streams[0], "/testing.TestDriver/StartTestCase", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &testDriverStartTestCaseClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type TestDriver_StartTestCaseClient interface {
|
|
Recv() (*TestReport, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type testDriverStartTestCaseClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *testDriverStartTestCaseClient) Recv() (*TestReport, error) {
|
|
m := new(TestReport)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// TestDriverServer is the server API for TestDriver service.
|
|
// All implementations must embed UnimplementedTestDriverServer
|
|
// for forward compatibility
|
|
type TestDriverServer interface {
|
|
// Returns number of available integration test caes in the test driver
|
|
TestCaseCount(context.Context, *emptypb.Empty) (*TestCaseNumber, error)
|
|
// Ask the test driver to start the test case with given number. As test case progresses, the driver sends reports via the stream
|
|
// Test drivier also notifies about the end of test case via the stream
|
|
StartTestCase(*TestCaseNumber, TestDriver_StartTestCaseServer) error
|
|
mustEmbedUnimplementedTestDriverServer()
|
|
}
|
|
|
|
// UnimplementedTestDriverServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedTestDriverServer struct {
|
|
}
|
|
|
|
func (UnimplementedTestDriverServer) TestCaseCount(context.Context, *emptypb.Empty) (*TestCaseNumber, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method TestCaseCount not implemented")
|
|
}
|
|
func (UnimplementedTestDriverServer) StartTestCase(*TestCaseNumber, TestDriver_StartTestCaseServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method StartTestCase not implemented")
|
|
}
|
|
func (UnimplementedTestDriverServer) mustEmbedUnimplementedTestDriverServer() {}
|
|
|
|
// UnsafeTestDriverServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to TestDriverServer will
|
|
// result in compilation errors.
|
|
type UnsafeTestDriverServer interface {
|
|
mustEmbedUnimplementedTestDriverServer()
|
|
}
|
|
|
|
func RegisterTestDriverServer(s grpc.ServiceRegistrar, srv TestDriverServer) {
|
|
s.RegisterService(&TestDriver_ServiceDesc, srv)
|
|
}
|
|
|
|
func _TestDriver_TestCaseCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(emptypb.Empty)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TestDriverServer).TestCaseCount(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/testing.TestDriver/TestCaseCount",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TestDriverServer).TestCaseCount(ctx, req.(*emptypb.Empty))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _TestDriver_StartTestCase_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(TestCaseNumber)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(TestDriverServer).StartTestCase(m, &testDriverStartTestCaseServer{stream})
|
|
}
|
|
|
|
type TestDriver_StartTestCaseServer interface {
|
|
Send(*TestReport) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type testDriverStartTestCaseServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *testDriverStartTestCaseServer) Send(m *TestReport) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
// TestDriver_ServiceDesc is the grpc.ServiceDesc for TestDriver service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var TestDriver_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "testing.TestDriver",
|
|
HandlerType: (*TestDriverServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "TestCaseCount",
|
|
Handler: _TestDriver_TestCaseCount_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "StartTestCase",
|
|
Handler: _TestDriver_StartTestCase_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "testing/testing.proto",
|
|
}
|