Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterP2PServer(s grpc.ServiceRegistrar, srv P2PServer)
- type BlocksInRangeRequest
- func (*BlocksInRangeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BlocksInRangeRequest) GetEndHeight() uint64
- func (x *BlocksInRangeRequest) GetStartHeight() uint64
- func (*BlocksInRangeRequest) ProtoMessage()
- func (x *BlocksInRangeRequest) ProtoReflect() protoreflect.Message
- func (x *BlocksInRangeRequest) Reset()
- func (x *BlocksInRangeRequest) String() string
- type BlocksInRangeResponse
- func (*BlocksInRangeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BlocksInRangeResponse) GetEncodedBlocks() [][]byte
- func (*BlocksInRangeResponse) ProtoMessage()
- func (x *BlocksInRangeResponse) ProtoReflect() protoreflect.Message
- func (x *BlocksInRangeResponse) Reset()
- func (x *BlocksInRangeResponse) String() string
- type LatestBlockRequest
- type LatestBlockResponse
- func (*LatestBlockResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LatestBlockResponse) GetEncodedBlock() []byte
- func (x *LatestBlockResponse) GetHeight() uint64
- func (*LatestBlockResponse) ProtoMessage()
- func (x *LatestBlockResponse) ProtoReflect() protoreflect.Message
- func (x *LatestBlockResponse) Reset()
- func (x *LatestBlockResponse) String() string
- type P2PClient
- type P2PServer
- type TxpoolPendingRequest
- type TxpoolPendingResponse
- func (*TxpoolPendingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TxpoolPendingResponse) GetEncodedTxs() [][]byte
- func (*TxpoolPendingResponse) ProtoMessage()
- func (x *TxpoolPendingResponse) ProtoReflect() protoreflect.Message
- func (x *TxpoolPendingResponse) Reset()
- func (x *TxpoolPendingResponse) String() string
- type UnimplementedP2PServer
- func (UnimplementedP2PServer) BlocksInRange(context.Context, *BlocksInRangeRequest) (*BlocksInRangeResponse, error)
- func (UnimplementedP2PServer) LatestBlock(context.Context, *LatestBlockRequest) (*LatestBlockResponse, error)
- func (UnimplementedP2PServer) TxPoolPending(context.Context, *TxpoolPendingRequest) (*TxpoolPendingResponse, error)
- type UnsafeP2PServer
Constants ¶
const ( P2P_LatestBlock_FullMethodName = "/protos.P2P/LatestBlock" P2P_TxPoolPending_FullMethodName = "/protos.P2P/TxPoolPending" P2P_BlocksInRange_FullMethodName = "/protos.P2P/BlocksInRange" )
Variables ¶
var File_protos_p2p_proto protoreflect.FileDescriptor
var P2P_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protos.P2P", HandlerType: (*P2PServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "LatestBlock", Handler: _P2P_LatestBlock_Handler, }, { MethodName: "TxPoolPending", Handler: _P2P_TxPoolPending_Handler, }, { MethodName: "BlocksInRange", Handler: _P2P_BlocksInRange_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/p2p.proto", }
P2P_ServiceDesc is the grpc.ServiceDesc for P2P service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterP2PServer ¶
func RegisterP2PServer(s grpc.ServiceRegistrar, srv P2PServer)
Types ¶
type BlocksInRangeRequest ¶
type BlocksInRangeRequest struct { StartHeight uint64 `protobuf:"varint,1,opt,name=startHeight,proto3" json:"startHeight,omitempty"` EndHeight uint64 `protobuf:"varint,2,opt,name=endHeight,proto3" json:"endHeight,omitempty"` // contains filtered or unexported fields }
func (*BlocksInRangeRequest) Descriptor
deprecated
func (*BlocksInRangeRequest) Descriptor() ([]byte, []int)
Deprecated: Use BlocksInRangeRequest.ProtoReflect.Descriptor instead.
func (*BlocksInRangeRequest) GetEndHeight ¶
func (x *BlocksInRangeRequest) GetEndHeight() uint64
func (*BlocksInRangeRequest) GetStartHeight ¶
func (x *BlocksInRangeRequest) GetStartHeight() uint64
func (*BlocksInRangeRequest) ProtoMessage ¶
func (*BlocksInRangeRequest) ProtoMessage()
func (*BlocksInRangeRequest) ProtoReflect ¶
func (x *BlocksInRangeRequest) ProtoReflect() protoreflect.Message
func (*BlocksInRangeRequest) Reset ¶
func (x *BlocksInRangeRequest) Reset()
func (*BlocksInRangeRequest) String ¶
func (x *BlocksInRangeRequest) String() string
type BlocksInRangeResponse ¶
type BlocksInRangeResponse struct { EncodedBlocks [][]byte `protobuf:"bytes,1,rep,name=encodedBlocks,proto3" json:"encodedBlocks,omitempty"` // contains filtered or unexported fields }
func (*BlocksInRangeResponse) Descriptor
deprecated
func (*BlocksInRangeResponse) Descriptor() ([]byte, []int)
Deprecated: Use BlocksInRangeResponse.ProtoReflect.Descriptor instead.
func (*BlocksInRangeResponse) GetEncodedBlocks ¶
func (x *BlocksInRangeResponse) GetEncodedBlocks() [][]byte
func (*BlocksInRangeResponse) ProtoMessage ¶
func (*BlocksInRangeResponse) ProtoMessage()
func (*BlocksInRangeResponse) ProtoReflect ¶
func (x *BlocksInRangeResponse) ProtoReflect() protoreflect.Message
func (*BlocksInRangeResponse) Reset ¶
func (x *BlocksInRangeResponse) Reset()
func (*BlocksInRangeResponse) String ¶
func (x *BlocksInRangeResponse) String() string
type LatestBlockRequest ¶
type LatestBlockRequest struct {
// contains filtered or unexported fields
}
func (*LatestBlockRequest) Descriptor
deprecated
func (*LatestBlockRequest) Descriptor() ([]byte, []int)
Deprecated: Use LatestBlockRequest.ProtoReflect.Descriptor instead.
func (*LatestBlockRequest) ProtoMessage ¶
func (*LatestBlockRequest) ProtoMessage()
func (*LatestBlockRequest) ProtoReflect ¶
func (x *LatestBlockRequest) ProtoReflect() protoreflect.Message
func (*LatestBlockRequest) Reset ¶
func (x *LatestBlockRequest) Reset()
func (*LatestBlockRequest) String ¶
func (x *LatestBlockRequest) String() string
type LatestBlockResponse ¶
type LatestBlockResponse struct { Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` EncodedBlock []byte `protobuf:"bytes,2,opt,name=encodedBlock,proto3" json:"encodedBlock,omitempty"` // contains filtered or unexported fields }
func (*LatestBlockResponse) Descriptor
deprecated
func (*LatestBlockResponse) Descriptor() ([]byte, []int)
Deprecated: Use LatestBlockResponse.ProtoReflect.Descriptor instead.
func (*LatestBlockResponse) GetEncodedBlock ¶
func (x *LatestBlockResponse) GetEncodedBlock() []byte
func (*LatestBlockResponse) GetHeight ¶
func (x *LatestBlockResponse) GetHeight() uint64
func (*LatestBlockResponse) ProtoMessage ¶
func (*LatestBlockResponse) ProtoMessage()
func (*LatestBlockResponse) ProtoReflect ¶
func (x *LatestBlockResponse) ProtoReflect() protoreflect.Message
func (*LatestBlockResponse) Reset ¶
func (x *LatestBlockResponse) Reset()
func (*LatestBlockResponse) String ¶
func (x *LatestBlockResponse) String() string
type P2PClient ¶
type P2PClient interface { LatestBlock(ctx context.Context, in *LatestBlockRequest, opts ...grpc.CallOption) (*LatestBlockResponse, error) TxPoolPending(ctx context.Context, in *TxpoolPendingRequest, opts ...grpc.CallOption) (*TxpoolPendingResponse, error) BlocksInRange(ctx context.Context, in *BlocksInRangeRequest, opts ...grpc.CallOption) (*BlocksInRangeResponse, error) }
P2PClient is the client API for P2P 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 NewP2PClient ¶
func NewP2PClient(cc grpc.ClientConnInterface) P2PClient
type P2PServer ¶
type P2PServer interface { LatestBlock(context.Context, *LatestBlockRequest) (*LatestBlockResponse, error) TxPoolPending(context.Context, *TxpoolPendingRequest) (*TxpoolPendingResponse, error) BlocksInRange(context.Context, *BlocksInRangeRequest) (*BlocksInRangeResponse, error) // contains filtered or unexported methods }
P2PServer is the server API for P2P service. All implementations must embed UnimplementedP2PServer for forward compatibility
type TxpoolPendingRequest ¶
type TxpoolPendingRequest struct {
// contains filtered or unexported fields
}
func (*TxpoolPendingRequest) Descriptor
deprecated
func (*TxpoolPendingRequest) Descriptor() ([]byte, []int)
Deprecated: Use TxpoolPendingRequest.ProtoReflect.Descriptor instead.
func (*TxpoolPendingRequest) ProtoMessage ¶
func (*TxpoolPendingRequest) ProtoMessage()
func (*TxpoolPendingRequest) ProtoReflect ¶
func (x *TxpoolPendingRequest) ProtoReflect() protoreflect.Message
func (*TxpoolPendingRequest) Reset ¶
func (x *TxpoolPendingRequest) Reset()
func (*TxpoolPendingRequest) String ¶
func (x *TxpoolPendingRequest) String() string
type TxpoolPendingResponse ¶
type TxpoolPendingResponse struct { EncodedTxs [][]byte `protobuf:"bytes,1,rep,name=encodedTxs,proto3" json:"encodedTxs,omitempty"` // contains filtered or unexported fields }
func (*TxpoolPendingResponse) Descriptor
deprecated
func (*TxpoolPendingResponse) Descriptor() ([]byte, []int)
Deprecated: Use TxpoolPendingResponse.ProtoReflect.Descriptor instead.
func (*TxpoolPendingResponse) GetEncodedTxs ¶
func (x *TxpoolPendingResponse) GetEncodedTxs() [][]byte
func (*TxpoolPendingResponse) ProtoMessage ¶
func (*TxpoolPendingResponse) ProtoMessage()
func (*TxpoolPendingResponse) ProtoReflect ¶
func (x *TxpoolPendingResponse) ProtoReflect() protoreflect.Message
func (*TxpoolPendingResponse) Reset ¶
func (x *TxpoolPendingResponse) Reset()
func (*TxpoolPendingResponse) String ¶
func (x *TxpoolPendingResponse) String() string
type UnimplementedP2PServer ¶
type UnimplementedP2PServer struct { }
UnimplementedP2PServer must be embedded to have forward compatible implementations.
func (UnimplementedP2PServer) BlocksInRange ¶
func (UnimplementedP2PServer) BlocksInRange(context.Context, *BlocksInRangeRequest) (*BlocksInRangeResponse, error)
func (UnimplementedP2PServer) LatestBlock ¶
func (UnimplementedP2PServer) LatestBlock(context.Context, *LatestBlockRequest) (*LatestBlockResponse, error)
func (UnimplementedP2PServer) TxPoolPending ¶
func (UnimplementedP2PServer) TxPoolPending(context.Context, *TxpoolPendingRequest) (*TxpoolPendingResponse, error)
type UnsafeP2PServer ¶
type UnsafeP2PServer interface {
// contains filtered or unexported methods
}
UnsafeP2PServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to P2PServer will result in compilation errors.