Documentation ¶
Index ¶
- Variables
- func RegisterSystemServer(s grpc.ServiceRegistrar, srv SystemServer)
- type BlockByNumberRequest
- func (*BlockByNumberRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BlockByNumberRequest) GetNumber() uint64
- func (*BlockByNumberRequest) ProtoMessage()
- func (x *BlockByNumberRequest) ProtoReflect() protoreflect.Message
- func (x *BlockByNumberRequest) Reset()
- func (x *BlockByNumberRequest) String() string
- type BlockResponse
- type BlockchainEvent
- func (*BlockchainEvent) Descriptor() ([]byte, []int)deprecated
- func (x *BlockchainEvent) GetAdded() []*BlockchainEvent_Header
- func (x *BlockchainEvent) GetRemoved() []*BlockchainEvent_Header
- func (*BlockchainEvent) ProtoMessage()
- func (x *BlockchainEvent) ProtoReflect() protoreflect.Message
- func (x *BlockchainEvent) Reset()
- func (x *BlockchainEvent) String() string
- type BlockchainEvent_Header
- func (*BlockchainEvent_Header) Descriptor() ([]byte, []int)deprecated
- func (x *BlockchainEvent_Header) GetHash() string
- func (x *BlockchainEvent_Header) GetNumber() int64
- func (*BlockchainEvent_Header) ProtoMessage()
- func (x *BlockchainEvent_Header) ProtoReflect() protoreflect.Message
- func (x *BlockchainEvent_Header) Reset()
- func (x *BlockchainEvent_Header) String() string
- type ExportEvent
- func (*ExportEvent) Descriptor() ([]byte, []int)deprecated
- func (x *ExportEvent) GetData() []byte
- func (x *ExportEvent) GetFrom() uint64
- func (x *ExportEvent) GetLatest() uint64
- func (x *ExportEvent) GetTo() uint64
- func (*ExportEvent) ProtoMessage()
- func (x *ExportEvent) ProtoReflect() protoreflect.Message
- func (x *ExportEvent) Reset()
- func (x *ExportEvent) String() string
- type ExportRequest
- func (*ExportRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExportRequest) GetFrom() uint64
- func (x *ExportRequest) GetTo() uint64
- func (*ExportRequest) ProtoMessage()
- func (x *ExportRequest) ProtoReflect() protoreflect.Message
- func (x *ExportRequest) Reset()
- func (x *ExportRequest) String() string
- type Peer
- type PeersAddRequest
- func (*PeersAddRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PeersAddRequest) GetBlocked() bool
- func (x *PeersAddRequest) GetId() string
- func (*PeersAddRequest) ProtoMessage()
- func (x *PeersAddRequest) ProtoReflect() protoreflect.Message
- func (x *PeersAddRequest) Reset()
- func (x *PeersAddRequest) String() string
- type PeersListResponse
- type PeersStatusRequest
- type ServerStatus
- func (*ServerStatus) Descriptor() ([]byte, []int)deprecated
- func (x *ServerStatus) GetCurrent() *ServerStatus_Block
- func (x *ServerStatus) GetGenesis() string
- func (x *ServerStatus) GetNetwork() int64
- func (x *ServerStatus) GetP2PAddr() string
- func (*ServerStatus) ProtoMessage()
- func (x *ServerStatus) ProtoReflect() protoreflect.Message
- func (x *ServerStatus) Reset()
- func (x *ServerStatus) String() string
- type ServerStatus_Block
- func (*ServerStatus_Block) Descriptor() ([]byte, []int)deprecated
- func (x *ServerStatus_Block) GetHash() string
- func (x *ServerStatus_Block) GetNumber() int64
- func (*ServerStatus_Block) ProtoMessage()
- func (x *ServerStatus_Block) ProtoReflect() protoreflect.Message
- func (x *ServerStatus_Block) Reset()
- func (x *ServerStatus_Block) String() string
- type SystemClient
- type SystemServer
- type System_ExportClient
- type System_ExportServer
- type System_SubscribeClient
- type System_SubscribeServer
- type UnimplementedSystemServer
- func (UnimplementedSystemServer) BlockByNumber(context.Context, *BlockByNumberRequest) (*BlockResponse, error)
- func (UnimplementedSystemServer) Export(*ExportRequest, System_ExportServer) error
- func (UnimplementedSystemServer) GetStatus(context.Context, *empty.Empty) (*ServerStatus, error)
- func (UnimplementedSystemServer) PeersAdd(context.Context, *PeersAddRequest) (*empty.Empty, error)
- func (UnimplementedSystemServer) PeersList(context.Context, *empty.Empty) (*PeersListResponse, error)
- func (UnimplementedSystemServer) PeersStatus(context.Context, *PeersStatusRequest) (*Peer, error)
- func (UnimplementedSystemServer) Subscribe(*empty.Empty, System_SubscribeServer) error
- type UnsafeSystemServer
Constants ¶
This section is empty.
Variables ¶
var File_server_proto_system_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSystemServer ¶
func RegisterSystemServer(s grpc.ServiceRegistrar, srv SystemServer)
Types ¶
type BlockByNumberRequest ¶
type BlockByNumberRequest struct { Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
func (*BlockByNumberRequest) Descriptor
deprecated
func (*BlockByNumberRequest) Descriptor() ([]byte, []int)
Deprecated: Use BlockByNumberRequest.ProtoReflect.Descriptor instead.
func (*BlockByNumberRequest) GetNumber ¶
func (x *BlockByNumberRequest) GetNumber() uint64
func (*BlockByNumberRequest) ProtoMessage ¶
func (*BlockByNumberRequest) ProtoMessage()
func (*BlockByNumberRequest) ProtoReflect ¶
func (x *BlockByNumberRequest) ProtoReflect() protoreflect.Message
func (*BlockByNumberRequest) Reset ¶
func (x *BlockByNumberRequest) Reset()
func (*BlockByNumberRequest) String ¶
func (x *BlockByNumberRequest) String() string
type BlockResponse ¶
type BlockResponse struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*BlockResponse) Descriptor
deprecated
func (*BlockResponse) Descriptor() ([]byte, []int)
Deprecated: Use BlockResponse.ProtoReflect.Descriptor instead.
func (*BlockResponse) GetData ¶
func (x *BlockResponse) GetData() []byte
func (*BlockResponse) ProtoMessage ¶
func (*BlockResponse) ProtoMessage()
func (*BlockResponse) ProtoReflect ¶
func (x *BlockResponse) ProtoReflect() protoreflect.Message
func (*BlockResponse) Reset ¶
func (x *BlockResponse) Reset()
func (*BlockResponse) String ¶
func (x *BlockResponse) String() string
type BlockchainEvent ¶
type BlockchainEvent struct { Added []*BlockchainEvent_Header `protobuf:"bytes,1,rep,name=added,proto3" json:"added,omitempty"` Removed []*BlockchainEvent_Header `protobuf:"bytes,2,rep,name=removed,proto3" json:"removed,omitempty"` // contains filtered or unexported fields }
func (*BlockchainEvent) Descriptor
deprecated
func (*BlockchainEvent) Descriptor() ([]byte, []int)
Deprecated: Use BlockchainEvent.ProtoReflect.Descriptor instead.
func (*BlockchainEvent) GetAdded ¶
func (x *BlockchainEvent) GetAdded() []*BlockchainEvent_Header
func (*BlockchainEvent) GetRemoved ¶
func (x *BlockchainEvent) GetRemoved() []*BlockchainEvent_Header
func (*BlockchainEvent) ProtoMessage ¶
func (*BlockchainEvent) ProtoMessage()
func (*BlockchainEvent) ProtoReflect ¶
func (x *BlockchainEvent) ProtoReflect() protoreflect.Message
func (*BlockchainEvent) Reset ¶
func (x *BlockchainEvent) Reset()
func (*BlockchainEvent) String ¶
func (x *BlockchainEvent) String() string
type BlockchainEvent_Header ¶
type BlockchainEvent_Header struct { Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*BlockchainEvent_Header) Descriptor
deprecated
func (*BlockchainEvent_Header) Descriptor() ([]byte, []int)
Deprecated: Use BlockchainEvent_Header.ProtoReflect.Descriptor instead.
func (*BlockchainEvent_Header) GetHash ¶
func (x *BlockchainEvent_Header) GetHash() string
func (*BlockchainEvent_Header) GetNumber ¶
func (x *BlockchainEvent_Header) GetNumber() int64
func (*BlockchainEvent_Header) ProtoMessage ¶
func (*BlockchainEvent_Header) ProtoMessage()
func (*BlockchainEvent_Header) ProtoReflect ¶
func (x *BlockchainEvent_Header) ProtoReflect() protoreflect.Message
func (*BlockchainEvent_Header) Reset ¶
func (x *BlockchainEvent_Header) Reset()
func (*BlockchainEvent_Header) String ¶
func (x *BlockchainEvent_Header) String() string
type ExportEvent ¶
type ExportEvent struct { From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` // null when zero To uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` Latest uint64 `protobuf:"varint,3,opt,name=latest,proto3" json:"latest,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*ExportEvent) Descriptor
deprecated
func (*ExportEvent) Descriptor() ([]byte, []int)
Deprecated: Use ExportEvent.ProtoReflect.Descriptor instead.
func (*ExportEvent) GetData ¶
func (x *ExportEvent) GetData() []byte
func (*ExportEvent) GetFrom ¶
func (x *ExportEvent) GetFrom() uint64
func (*ExportEvent) GetLatest ¶
func (x *ExportEvent) GetLatest() uint64
func (*ExportEvent) GetTo ¶
func (x *ExportEvent) GetTo() uint64
func (*ExportEvent) ProtoMessage ¶
func (*ExportEvent) ProtoMessage()
func (*ExportEvent) ProtoReflect ¶
func (x *ExportEvent) ProtoReflect() protoreflect.Message
func (*ExportEvent) Reset ¶
func (x *ExportEvent) Reset()
func (*ExportEvent) String ¶
func (x *ExportEvent) String() string
type ExportRequest ¶
type ExportRequest struct { From uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"` To uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"` // contains filtered or unexported fields }
func (*ExportRequest) Descriptor
deprecated
func (*ExportRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExportRequest.ProtoReflect.Descriptor instead.
func (*ExportRequest) GetFrom ¶
func (x *ExportRequest) GetFrom() uint64
func (*ExportRequest) GetTo ¶
func (x *ExportRequest) GetTo() uint64
func (*ExportRequest) ProtoMessage ¶
func (*ExportRequest) ProtoMessage()
func (*ExportRequest) ProtoReflect ¶
func (x *ExportRequest) ProtoReflect() protoreflect.Message
func (*ExportRequest) Reset ¶
func (x *ExportRequest) Reset()
func (*ExportRequest) String ¶
func (x *ExportRequest) String() string
type Peer ¶
type Peer struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Protocols []string `protobuf:"bytes,2,rep,name=protocols,proto3" json:"protocols,omitempty"` Addrs []string `protobuf:"bytes,3,rep,name=addrs,proto3" json:"addrs,omitempty"` // contains filtered or unexported fields }
func (*Peer) Descriptor
deprecated
func (*Peer) GetProtocols ¶
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
func (*Peer) ProtoReflect ¶
func (x *Peer) ProtoReflect() protoreflect.Message
type PeersAddRequest ¶
type PeersAddRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Blocked bool `protobuf:"varint,2,opt,name=blocked,proto3" json:"blocked,omitempty"` // contains filtered or unexported fields }
func (*PeersAddRequest) Descriptor
deprecated
func (*PeersAddRequest) Descriptor() ([]byte, []int)
Deprecated: Use PeersAddRequest.ProtoReflect.Descriptor instead.
func (*PeersAddRequest) GetBlocked ¶
func (x *PeersAddRequest) GetBlocked() bool
func (*PeersAddRequest) GetId ¶
func (x *PeersAddRequest) GetId() string
func (*PeersAddRequest) ProtoMessage ¶
func (*PeersAddRequest) ProtoMessage()
func (*PeersAddRequest) ProtoReflect ¶
func (x *PeersAddRequest) ProtoReflect() protoreflect.Message
func (*PeersAddRequest) Reset ¶
func (x *PeersAddRequest) Reset()
func (*PeersAddRequest) String ¶
func (x *PeersAddRequest) String() string
type PeersListResponse ¶
type PeersListResponse struct { Peers []*Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"` // contains filtered or unexported fields }
func (*PeersListResponse) Descriptor
deprecated
func (*PeersListResponse) Descriptor() ([]byte, []int)
Deprecated: Use PeersListResponse.ProtoReflect.Descriptor instead.
func (*PeersListResponse) GetPeers ¶
func (x *PeersListResponse) GetPeers() []*Peer
func (*PeersListResponse) ProtoMessage ¶
func (*PeersListResponse) ProtoMessage()
func (*PeersListResponse) ProtoReflect ¶
func (x *PeersListResponse) ProtoReflect() protoreflect.Message
func (*PeersListResponse) Reset ¶
func (x *PeersListResponse) Reset()
func (*PeersListResponse) String ¶
func (x *PeersListResponse) String() string
type PeersStatusRequest ¶
type PeersStatusRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*PeersStatusRequest) Descriptor
deprecated
func (*PeersStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use PeersStatusRequest.ProtoReflect.Descriptor instead.
func (*PeersStatusRequest) GetId ¶
func (x *PeersStatusRequest) GetId() string
func (*PeersStatusRequest) ProtoMessage ¶
func (*PeersStatusRequest) ProtoMessage()
func (*PeersStatusRequest) ProtoReflect ¶
func (x *PeersStatusRequest) ProtoReflect() protoreflect.Message
func (*PeersStatusRequest) Reset ¶
func (x *PeersStatusRequest) Reset()
func (*PeersStatusRequest) String ¶
func (x *PeersStatusRequest) String() string
type ServerStatus ¶
type ServerStatus struct { Network int64 `protobuf:"varint,1,opt,name=network,proto3" json:"network,omitempty"` Genesis string `protobuf:"bytes,2,opt,name=genesis,proto3" json:"genesis,omitempty"` Current *ServerStatus_Block `protobuf:"bytes,3,opt,name=current,proto3" json:"current,omitempty"` P2PAddr string `protobuf:"bytes,4,opt,name=p2pAddr,proto3" json:"p2pAddr,omitempty"` // contains filtered or unexported fields }
func (*ServerStatus) Descriptor
deprecated
func (*ServerStatus) Descriptor() ([]byte, []int)
Deprecated: Use ServerStatus.ProtoReflect.Descriptor instead.
func (*ServerStatus) GetCurrent ¶
func (x *ServerStatus) GetCurrent() *ServerStatus_Block
func (*ServerStatus) GetGenesis ¶
func (x *ServerStatus) GetGenesis() string
func (*ServerStatus) GetNetwork ¶
func (x *ServerStatus) GetNetwork() int64
func (*ServerStatus) GetP2PAddr ¶
func (x *ServerStatus) GetP2PAddr() string
func (*ServerStatus) ProtoMessage ¶
func (*ServerStatus) ProtoMessage()
func (*ServerStatus) ProtoReflect ¶
func (x *ServerStatus) ProtoReflect() protoreflect.Message
func (*ServerStatus) Reset ¶
func (x *ServerStatus) Reset()
func (*ServerStatus) String ¶
func (x *ServerStatus) String() string
type ServerStatus_Block ¶
type ServerStatus_Block struct { Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*ServerStatus_Block) Descriptor
deprecated
func (*ServerStatus_Block) Descriptor() ([]byte, []int)
Deprecated: Use ServerStatus_Block.ProtoReflect.Descriptor instead.
func (*ServerStatus_Block) GetHash ¶
func (x *ServerStatus_Block) GetHash() string
func (*ServerStatus_Block) GetNumber ¶
func (x *ServerStatus_Block) GetNumber() int64
func (*ServerStatus_Block) ProtoMessage ¶
func (*ServerStatus_Block) ProtoMessage()
func (*ServerStatus_Block) ProtoReflect ¶
func (x *ServerStatus_Block) ProtoReflect() protoreflect.Message
func (*ServerStatus_Block) Reset ¶
func (x *ServerStatus_Block) Reset()
func (*ServerStatus_Block) String ¶
func (x *ServerStatus_Block) String() string
type SystemClient ¶
type SystemClient interface { // GetInfo returns info about the client GetStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ServerStatus, error) // PeersAdd adds a new peer PeersAdd(ctx context.Context, in *PeersAddRequest, opts ...grpc.CallOption) (*empty.Empty, error) // PeersList returns the list of peers PeersList(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PeersListResponse, error) // PeersInfo returns the info of a peer PeersStatus(ctx context.Context, in *PeersStatusRequest, opts ...grpc.CallOption) (*Peer, error) // Subscribe subscribes to blockchain events Subscribe(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (System_SubscribeClient, error) // Export returns blockchain data BlockByNumber(ctx context.Context, in *BlockByNumberRequest, opts ...grpc.CallOption) (*BlockResponse, error) // Export returns blockchain data Export(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (System_ExportClient, error) }
SystemClient is the client API for System 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 NewSystemClient ¶
func NewSystemClient(cc grpc.ClientConnInterface) SystemClient
type SystemServer ¶
type SystemServer interface { // GetInfo returns info about the client GetStatus(context.Context, *empty.Empty) (*ServerStatus, error) // PeersAdd adds a new peer PeersAdd(context.Context, *PeersAddRequest) (*empty.Empty, error) // PeersList returns the list of peers PeersList(context.Context, *empty.Empty) (*PeersListResponse, error) // PeersInfo returns the info of a peer PeersStatus(context.Context, *PeersStatusRequest) (*Peer, error) // Subscribe subscribes to blockchain events Subscribe(*empty.Empty, System_SubscribeServer) error // Export returns blockchain data BlockByNumber(context.Context, *BlockByNumberRequest) (*BlockResponse, error) // Export returns blockchain data Export(*ExportRequest, System_ExportServer) error // contains filtered or unexported methods }
SystemServer is the server API for System service. All implementations must embed UnimplementedSystemServer for forward compatibility
type System_ExportClient ¶
type System_ExportClient interface { Recv() (*ExportEvent, error) grpc.ClientStream }
type System_ExportServer ¶
type System_ExportServer interface { Send(*ExportEvent) error grpc.ServerStream }
type System_SubscribeClient ¶
type System_SubscribeClient interface { Recv() (*BlockchainEvent, error) grpc.ClientStream }
type System_SubscribeServer ¶
type System_SubscribeServer interface { Send(*BlockchainEvent) error grpc.ServerStream }
type UnimplementedSystemServer ¶
type UnimplementedSystemServer struct { }
UnimplementedSystemServer must be embedded to have forward compatible implementations.
func (UnimplementedSystemServer) BlockByNumber ¶
func (UnimplementedSystemServer) BlockByNumber(context.Context, *BlockByNumberRequest) (*BlockResponse, error)
func (UnimplementedSystemServer) Export ¶
func (UnimplementedSystemServer) Export(*ExportRequest, System_ExportServer) error
func (UnimplementedSystemServer) GetStatus ¶
func (UnimplementedSystemServer) GetStatus(context.Context, *empty.Empty) (*ServerStatus, error)
func (UnimplementedSystemServer) PeersAdd ¶
func (UnimplementedSystemServer) PeersAdd(context.Context, *PeersAddRequest) (*empty.Empty, error)
func (UnimplementedSystemServer) PeersList ¶
func (UnimplementedSystemServer) PeersList(context.Context, *empty.Empty) (*PeersListResponse, error)
func (UnimplementedSystemServer) PeersStatus ¶
func (UnimplementedSystemServer) PeersStatus(context.Context, *PeersStatusRequest) (*Peer, error)
func (UnimplementedSystemServer) Subscribe ¶
func (UnimplementedSystemServer) Subscribe(*empty.Empty, System_SubscribeServer) error
type UnsafeSystemServer ¶
type UnsafeSystemServer interface {
// contains filtered or unexported methods
}
UnsafeSystemServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SystemServer will result in compilation errors.