Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type BlockRequest
- func (*BlockRequest) Descriptor() ([]byte, []int)
- func (m *BlockRequest) GetId() uint64
- func (m *BlockRequest) GetLatest() bool
- func (m *BlockRequest) Marshal() (dAtA []byte, err error)
- func (m *BlockRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *BlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BlockRequest) ProtoMessage()
- func (m *BlockRequest) Reset()
- func (m *BlockRequest) Size() (n int)
- func (m *BlockRequest) String() string
- func (m *BlockRequest) Unmarshal(dAtA []byte) error
- func (m *BlockRequest) XXX_DiscardUnknown()
- func (m *BlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockRequest) XXX_Merge(src proto.Message)
- func (m *BlockRequest) XXX_Size() int
- func (m *BlockRequest) XXX_Unmarshal(b []byte) error
- type BlockResponse
- func (*BlockResponse) Descriptor() ([]byte, []int)
- func (m *BlockResponse) GetCreatedHeight() uint64
- func (m *BlockResponse) GetId() uint64
- func (m *BlockResponse) GetMsgs() []*Msg
- func (m *BlockResponse) Marshal() (dAtA []byte, err error)
- func (m *BlockResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *BlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BlockResponse) ProtoMessage()
- func (m *BlockResponse) Reset()
- func (m *BlockResponse) Size() (n int)
- func (m *BlockResponse) String() string
- func (m *BlockResponse) Unmarshal(dAtA []byte) error
- func (m *BlockResponse) XXX_DiscardUnknown()
- func (m *BlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockResponse) XXX_Merge(src proto.Message)
- func (m *BlockResponse) XXX_Size() int
- func (m *BlockResponse) XXX_Unmarshal(b []byte) error
- type EmitPortal
- type Msg
- func (*Msg) Descriptor() ([]byte, []int)
- func (m *Msg) GetDestChainId() uint64
- func (m *Msg) GetId() uint64
- func (m *Msg) GetMsgTypeId() uint64
- func (m *Msg) GetShardId() uint64
- func (m *Msg) GetStreamOffset() uint64
- func (m *Msg) GetType() uint32
- func (m *Msg) Marshal() (dAtA []byte, err error)
- func (m *Msg) MarshalTo(dAtA []byte) (int, error)
- func (m *Msg) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Msg) MsgType() MsgType
- func (*Msg) ProtoMessage()
- func (m *Msg) Reset()
- func (m *Msg) ShardID() xchain.ShardID
- func (m *Msg) Size() (n int)
- func (m *Msg) String() string
- func (m *Msg) Unmarshal(dAtA []byte) error
- func (m *Msg) XXX_DiscardUnknown()
- func (m *Msg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Msg) XXX_Merge(src proto.Message)
- func (m *Msg) XXX_Size() int
- func (m *Msg) XXX_Unmarshal(b []byte) error
- type MsgType
- type QueryClient
- type QueryServer
- type UnimplementedQueryServer
Constants ¶
View Source
const (
// ModuleName defines the module name.
ModuleName = "portal"
)
Variables ¶
Functions ¶
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type BlockRequest ¶
type BlockRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Latest bool `protobuf:"varint,2,opt,name=latest,proto3" json:"latest,omitempty"` }
func (*BlockRequest) Descriptor ¶
func (*BlockRequest) Descriptor() ([]byte, []int)
func (*BlockRequest) GetId ¶
func (m *BlockRequest) GetId() uint64
func (*BlockRequest) GetLatest ¶
func (m *BlockRequest) GetLatest() bool
func (*BlockRequest) Marshal ¶
func (m *BlockRequest) Marshal() (dAtA []byte, err error)
func (*BlockRequest) MarshalToSizedBuffer ¶
func (m *BlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BlockRequest) ProtoMessage ¶
func (*BlockRequest) ProtoMessage()
func (*BlockRequest) Reset ¶
func (m *BlockRequest) Reset()
func (*BlockRequest) Size ¶
func (m *BlockRequest) Size() (n int)
func (*BlockRequest) String ¶
func (m *BlockRequest) String() string
func (*BlockRequest) Unmarshal ¶
func (m *BlockRequest) Unmarshal(dAtA []byte) error
func (*BlockRequest) XXX_DiscardUnknown ¶
func (m *BlockRequest) XXX_DiscardUnknown()
func (*BlockRequest) XXX_Marshal ¶
func (m *BlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockRequest) XXX_Merge ¶
func (m *BlockRequest) XXX_Merge(src proto.Message)
func (*BlockRequest) XXX_Size ¶
func (m *BlockRequest) XXX_Size() int
func (*BlockRequest) XXX_Unmarshal ¶
func (m *BlockRequest) XXX_Unmarshal(b []byte) error
type BlockResponse ¶
type BlockResponse struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` CreatedHeight uint64 `protobuf:"varint,2,opt,name=created_height,json=createdHeight,proto3" json:"created_height,omitempty"` Msgs []*Msg `protobuf:"bytes,3,rep,name=msgs,proto3" json:"msgs,omitempty"` }
func (*BlockResponse) Descriptor ¶
func (*BlockResponse) Descriptor() ([]byte, []int)
func (*BlockResponse) GetCreatedHeight ¶
func (m *BlockResponse) GetCreatedHeight() uint64
func (*BlockResponse) GetId ¶
func (m *BlockResponse) GetId() uint64
func (*BlockResponse) GetMsgs ¶
func (m *BlockResponse) GetMsgs() []*Msg
func (*BlockResponse) Marshal ¶
func (m *BlockResponse) Marshal() (dAtA []byte, err error)
func (*BlockResponse) MarshalToSizedBuffer ¶
func (m *BlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BlockResponse) ProtoMessage ¶
func (*BlockResponse) ProtoMessage()
func (*BlockResponse) Reset ¶
func (m *BlockResponse) Reset()
func (*BlockResponse) Size ¶
func (m *BlockResponse) Size() (n int)
func (*BlockResponse) String ¶
func (m *BlockResponse) String() string
func (*BlockResponse) Unmarshal ¶
func (m *BlockResponse) Unmarshal(dAtA []byte) error
func (*BlockResponse) XXX_DiscardUnknown ¶
func (m *BlockResponse) XXX_DiscardUnknown()
func (*BlockResponse) XXX_Marshal ¶
func (m *BlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockResponse) XXX_Merge ¶
func (m *BlockResponse) XXX_Merge(src proto.Message)
func (*BlockResponse) XXX_Size ¶
func (m *BlockResponse) XXX_Size() int
func (*BlockResponse) XXX_Unmarshal ¶
func (m *BlockResponse) XXX_Unmarshal(b []byte) error
type EmitPortal ¶
type EmitPortal interface { // EmitMsg emits a cross chain message in the current block returning the xblock ID/Height/Offset. EmitMsg(ctx sdk.Context, typ MsgType, msgTypeID uint64, destChainID uint64, shardID xchain.ShardID) (uint64, error) }
EmitPortal provides an interface for modules to emit cross chain messages.
type Msg ¶
type Msg struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Type uint32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` MsgTypeId uint64 `protobuf:"varint,3,opt,name=msg_type_id,json=msgTypeId,proto3" json:"msg_type_id,omitempty"` DestChainId uint64 `protobuf:"varint,4,opt,name=dest_chain_id,json=destChainId,proto3" json:"dest_chain_id,omitempty"` ShardId uint64 `protobuf:"varint,5,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` StreamOffset uint64 `protobuf:"varint,6,opt,name=stream_offset,json=streamOffset,proto3" json:"stream_offset,omitempty"` }
func (*Msg) Descriptor ¶
func (*Msg) GetDestChainId ¶
func (*Msg) GetMsgTypeId ¶
func (*Msg) GetShardId ¶
func (*Msg) GetStreamOffset ¶
func (*Msg) ProtoMessage ¶
func (*Msg) ProtoMessage()
func (*Msg) XXX_DiscardUnknown ¶
func (m *Msg) XXX_DiscardUnknown()
func (*Msg) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface {
Block(ctx context.Context, in *BlockRequest, opts ...grpc.CallOption) (*BlockResponse, error)
}
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryServer ¶
type QueryServer interface {
Block(context.Context, *BlockRequest) (*BlockResponse, error)
}
QueryServer is the server API for Query service.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Block ¶
func (*UnimplementedQueryServer) Block(ctx context.Context, req *BlockRequest) (*BlockResponse, error)
Click to show internal directories.
Click to hide internal directories.