proto

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_syncer_proto_syncer_proto protoreflect.FileDescriptor

Functions

func RegisterSyncPeerServer

func RegisterSyncPeerServer(s grpc.ServiceRegistrar, srv SyncPeerServer)

Types

type Block

type Block struct {

	// RLP Encoded Block Data
	Block []byte `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"`
	// contains filtered or unexported fields
}

Block contains a block data

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBlock

func (x *Block) GetBlock() []byte

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type GetBlocksRequest

type GetBlocksRequest struct {

	// The height of beginning block to sync
	From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	// contains filtered or unexported fields
}

GetBlocksRequest is a request for GetBlocks

func (*GetBlocksRequest) Descriptor deprecated

func (*GetBlocksRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBlocksRequest.ProtoReflect.Descriptor instead.

func (*GetBlocksRequest) GetFrom

func (x *GetBlocksRequest) GetFrom() uint64

func (*GetBlocksRequest) ProtoMessage

func (*GetBlocksRequest) ProtoMessage()

func (*GetBlocksRequest) ProtoReflect

func (x *GetBlocksRequest) ProtoReflect() protoreflect.Message

func (*GetBlocksRequest) Reset

func (x *GetBlocksRequest) Reset()

func (*GetBlocksRequest) String

func (x *GetBlocksRequest) String() string

type SyncPeerClient

type SyncPeerClient interface {
	// Returns stream of blocks beginning specified from
	GetBlocks(ctx context.Context, in *GetBlocksRequest, opts ...grpc.CallOption) (SyncPeer_GetBlocksClient, error)
	// Returns server's status
	GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SyncPeerStatus, error)
}

SyncPeerClient is the client API for SyncPeer 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.

func NewSyncPeerClient

func NewSyncPeerClient(cc grpc.ClientConnInterface) SyncPeerClient

type SyncPeerServer

type SyncPeerServer interface {
	// Returns stream of blocks beginning specified from
	GetBlocks(*GetBlocksRequest, SyncPeer_GetBlocksServer) error
	// Returns server's status
	GetStatus(context.Context, *emptypb.Empty) (*SyncPeerStatus, error)
	// contains filtered or unexported methods
}

SyncPeerServer is the server API for SyncPeer service. All implementations must embed UnimplementedSyncPeerServer for forward compatibility

type SyncPeerStatus

type SyncPeerStatus struct {

	// Latest block height
	Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

SyncPeerStatus contains peer status

func (*SyncPeerStatus) Descriptor deprecated

func (*SyncPeerStatus) Descriptor() ([]byte, []int)

Deprecated: Use SyncPeerStatus.ProtoReflect.Descriptor instead.

func (*SyncPeerStatus) GetNumber

func (x *SyncPeerStatus) GetNumber() uint64

func (*SyncPeerStatus) ProtoMessage

func (*SyncPeerStatus) ProtoMessage()

func (*SyncPeerStatus) ProtoReflect

func (x *SyncPeerStatus) ProtoReflect() protoreflect.Message

func (*SyncPeerStatus) Reset

func (x *SyncPeerStatus) Reset()

func (*SyncPeerStatus) String

func (x *SyncPeerStatus) String() string

type SyncPeer_GetBlocksClient

type SyncPeer_GetBlocksClient interface {
	Recv() (*Block, error)
	grpc.ClientStream
}

type SyncPeer_GetBlocksServer

type SyncPeer_GetBlocksServer interface {
	Send(*Block) error
	grpc.ServerStream
}

type UnimplementedSyncPeerServer

type UnimplementedSyncPeerServer struct {
}

UnimplementedSyncPeerServer must be embedded to have forward compatible implementations.

func (UnimplementedSyncPeerServer) GetBlocks

func (UnimplementedSyncPeerServer) GetStatus

type UnsafeSyncPeerServer

type UnsafeSyncPeerServer interface {
	// contains filtered or unexported methods
}

UnsafeSyncPeerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SyncPeerServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL