v1

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBlock        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlock          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterBlockServiceServer

func RegisterBlockServiceServer(s grpc1.Server, srv BlockServiceServer)

Types

type BlockServiceClient

type BlockServiceClient interface {
	// GetBlock retrieves the block information at a particular height.
	GetByHeight(ctx context.Context, in *GetByHeightRequest, opts ...grpc.CallOption) (*GetByHeightResponse, error)
	// GetLatestHeight returns a stream of the latest block heights committed by
	// the network. This is a long-lived stream that is only terminated by the
	// server if an error occurs. The caller is expected to handle such
	// disconnections and automatically reconnect.
	GetLatestHeight(ctx context.Context, in *GetLatestHeightRequest, opts ...grpc.CallOption) (BlockService_GetLatestHeightClient, error)
}

BlockServiceClient is the client API for BlockService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewBlockServiceClient

func NewBlockServiceClient(cc grpc1.ClientConn) BlockServiceClient

type BlockServiceServer

type BlockServiceServer interface {
	// GetBlock retrieves the block information at a particular height.
	GetByHeight(context.Context, *GetByHeightRequest) (*GetByHeightResponse, error)
	// GetLatestHeight returns a stream of the latest block heights committed by
	// the network. This is a long-lived stream that is only terminated by the
	// server if an error occurs. The caller is expected to handle such
	// disconnections and automatically reconnect.
	GetLatestHeight(*GetLatestHeightRequest, BlockService_GetLatestHeightServer) error
}

BlockServiceServer is the server API for BlockService service.

type BlockService_GetLatestHeightClient

type BlockService_GetLatestHeightClient interface {
	Recv() (*GetLatestHeightResponse, error)
	grpc.ClientStream
}

type BlockService_GetLatestHeightServer

type BlockService_GetLatestHeightServer interface {
	Send(*GetLatestHeightResponse) error
	grpc.ServerStream
}

type GetByHeightRequest

type GetByHeightRequest struct {
	// The height of the block requested.
	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
}

GetByHeightRequest is a request for a block at the specified height.

func (*GetByHeightRequest) Descriptor

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

func (*GetByHeightRequest) GetHeight

func (m *GetByHeightRequest) GetHeight() int64

func (*GetByHeightRequest) Marshal

func (m *GetByHeightRequest) Marshal() (dAtA []byte, err error)

func (*GetByHeightRequest) MarshalTo

func (m *GetByHeightRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetByHeightRequest) MarshalToSizedBuffer

func (m *GetByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetByHeightRequest) ProtoMessage

func (*GetByHeightRequest) ProtoMessage()

func (*GetByHeightRequest) Reset

func (m *GetByHeightRequest) Reset()

func (*GetByHeightRequest) Size

func (m *GetByHeightRequest) Size() (n int)

func (*GetByHeightRequest) String

func (m *GetByHeightRequest) String() string

func (*GetByHeightRequest) Unmarshal

func (m *GetByHeightRequest) Unmarshal(dAtA []byte) error

func (*GetByHeightRequest) XXX_DiscardUnknown

func (m *GetByHeightRequest) XXX_DiscardUnknown()

func (*GetByHeightRequest) XXX_Marshal

func (m *GetByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetByHeightRequest) XXX_Merge

func (m *GetByHeightRequest) XXX_Merge(src proto.Message)

func (*GetByHeightRequest) XXX_Size

func (m *GetByHeightRequest) XXX_Size() int

func (*GetByHeightRequest) XXX_Unmarshal

func (m *GetByHeightRequest) XXX_Unmarshal(b []byte) error

type GetByHeightResponse

type GetByHeightResponse struct {
	BlockId *v1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
	Block   *v1.Block   `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
}

GetByHeightResponse contains the block ID and the block at the specified height.

func (*GetByHeightResponse) Descriptor

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

func (*GetByHeightResponse) GetBlock

func (m *GetByHeightResponse) GetBlock() *v1.Block

func (*GetByHeightResponse) GetBlockId

func (m *GetByHeightResponse) GetBlockId() *v1.BlockID

func (*GetByHeightResponse) Marshal

func (m *GetByHeightResponse) Marshal() (dAtA []byte, err error)

func (*GetByHeightResponse) MarshalTo

func (m *GetByHeightResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetByHeightResponse) MarshalToSizedBuffer

func (m *GetByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetByHeightResponse) ProtoMessage

func (*GetByHeightResponse) ProtoMessage()

func (*GetByHeightResponse) Reset

func (m *GetByHeightResponse) Reset()

func (*GetByHeightResponse) Size

func (m *GetByHeightResponse) Size() (n int)

func (*GetByHeightResponse) String

func (m *GetByHeightResponse) String() string

func (*GetByHeightResponse) Unmarshal

func (m *GetByHeightResponse) Unmarshal(dAtA []byte) error

func (*GetByHeightResponse) XXX_DiscardUnknown

func (m *GetByHeightResponse) XXX_DiscardUnknown()

func (*GetByHeightResponse) XXX_Marshal

func (m *GetByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetByHeightResponse) XXX_Merge

func (m *GetByHeightResponse) XXX_Merge(src proto.Message)

func (*GetByHeightResponse) XXX_Size

func (m *GetByHeightResponse) XXX_Size() int

func (*GetByHeightResponse) XXX_Unmarshal

func (m *GetByHeightResponse) XXX_Unmarshal(b []byte) error

type GetLatestHeightRequest

type GetLatestHeightRequest struct {
}

GetLatestHeightRequest - empty message since no parameter is required

func (*GetLatestHeightRequest) Descriptor

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

func (*GetLatestHeightRequest) Marshal

func (m *GetLatestHeightRequest) Marshal() (dAtA []byte, err error)

func (*GetLatestHeightRequest) MarshalTo

func (m *GetLatestHeightRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetLatestHeightRequest) MarshalToSizedBuffer

func (m *GetLatestHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetLatestHeightRequest) ProtoMessage

func (*GetLatestHeightRequest) ProtoMessage()

func (*GetLatestHeightRequest) Reset

func (m *GetLatestHeightRequest) Reset()

func (*GetLatestHeightRequest) Size

func (m *GetLatestHeightRequest) Size() (n int)

func (*GetLatestHeightRequest) String

func (m *GetLatestHeightRequest) String() string

func (*GetLatestHeightRequest) Unmarshal

func (m *GetLatestHeightRequest) Unmarshal(dAtA []byte) error

func (*GetLatestHeightRequest) XXX_DiscardUnknown

func (m *GetLatestHeightRequest) XXX_DiscardUnknown()

func (*GetLatestHeightRequest) XXX_Marshal

func (m *GetLatestHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetLatestHeightRequest) XXX_Merge

func (m *GetLatestHeightRequest) XXX_Merge(src proto.Message)

func (*GetLatestHeightRequest) XXX_Size

func (m *GetLatestHeightRequest) XXX_Size() int

func (*GetLatestHeightRequest) XXX_Unmarshal

func (m *GetLatestHeightRequest) XXX_Unmarshal(b []byte) error

type GetLatestHeightResponse

type GetLatestHeightResponse struct {
	// The height of the latest committed block. Will be 0 if no data has been
	// committed yet.
	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
}

GetLatestHeightResponse provides the height of the latest committed block.

func (*GetLatestHeightResponse) Descriptor

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

func (*GetLatestHeightResponse) GetHeight

func (m *GetLatestHeightResponse) GetHeight() int64

func (*GetLatestHeightResponse) Marshal

func (m *GetLatestHeightResponse) Marshal() (dAtA []byte, err error)

func (*GetLatestHeightResponse) MarshalTo

func (m *GetLatestHeightResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetLatestHeightResponse) MarshalToSizedBuffer

func (m *GetLatestHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetLatestHeightResponse) ProtoMessage

func (*GetLatestHeightResponse) ProtoMessage()

func (*GetLatestHeightResponse) Reset

func (m *GetLatestHeightResponse) Reset()

func (*GetLatestHeightResponse) Size

func (m *GetLatestHeightResponse) Size() (n int)

func (*GetLatestHeightResponse) String

func (m *GetLatestHeightResponse) String() string

func (*GetLatestHeightResponse) Unmarshal

func (m *GetLatestHeightResponse) Unmarshal(dAtA []byte) error

func (*GetLatestHeightResponse) XXX_DiscardUnknown

func (m *GetLatestHeightResponse) XXX_DiscardUnknown()

func (*GetLatestHeightResponse) XXX_Marshal

func (m *GetLatestHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetLatestHeightResponse) XXX_Merge

func (m *GetLatestHeightResponse) XXX_Merge(src proto.Message)

func (*GetLatestHeightResponse) XXX_Size

func (m *GetLatestHeightResponse) XXX_Size() int

func (*GetLatestHeightResponse) XXX_Unmarshal

func (m *GetLatestHeightResponse) XXX_Unmarshal(b []byte) error

type UnimplementedBlockServiceServer

type UnimplementedBlockServiceServer struct {
}

UnimplementedBlockServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedBlockServiceServer) GetByHeight

func (*UnimplementedBlockServiceServer) GetLatestHeight

Jump to

Keyboard shortcuts

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