Documentation
¶
Index ¶
- func InitGlobal(s *grpc.Server)
- func InitMesh(s *grpc.Server)
- func InitMocker(server *grpc.Server, netId int, epochLayers int, maxTxs int, layerDuration int)
- func InitNode(s *grpc.Server)
- type GlobalStateService
- func (s GlobalStateService) Account(ctx context.Context, request *v1.AccountRequest) (*v1.AccountResponse, error)
- func (s GlobalStateService) AccountDataQuery(ctx context.Context, request *v1.AccountDataQueryRequest) (*v1.AccountDataQueryResponse, error)
- func (s GlobalStateService) AccountDataStream(request *v1.AccountDataStreamRequest, ...) error
- func (s GlobalStateService) AppEventStream(request *v1.AppEventStreamRequest, ...) error
- func (s GlobalStateService) GlobalStateHash(ctx context.Context, request *v1.GlobalStateHashRequest) (*v1.GlobalStateHashResponse, error)
- func (s GlobalStateService) GlobalStateStream(request *v1.GlobalStateStreamRequest, ...) (err error)
- func (s GlobalStateService) SmesherDataQuery(ctx context.Context, request *v1.SmesherDataQueryRequest) (*v1.SmesherDataQueryResponse, error)
- func (s GlobalStateService) SmesherRewardStream(request *v1.SmesherRewardStreamRequest, ...) error
- type MeshService
- func (s MeshService) AccountMeshDataQuery(ctx context.Context, request *v1.AccountMeshDataQueryRequest) (*v1.AccountMeshDataQueryResponse, error)
- func (s MeshService) AccountMeshDataStream(request *v1.AccountMeshDataStreamRequest, ...) error
- func (s MeshService) CurrentEpoch(ctx context.Context, request *v1.CurrentEpochRequest) (*v1.CurrentEpochResponse, error)
- func (s MeshService) CurrentLayer(ctx context.Context, request *v1.CurrentLayerRequest) (*v1.CurrentLayerResponse, error)
- func (s MeshService) EpochNumLayers(ctx context.Context, request *v1.EpochNumLayersRequest) (*v1.EpochNumLayersResponse, error)
- func (s MeshService) GenesisTime(ctx context.Context, request *v1.GenesisTimeRequest) (*v1.GenesisTimeResponse, error)
- func (s MeshService) LayerDuration(ctx context.Context, request *v1.LayerDurationRequest) (*v1.LayerDurationResponse, error)
- func (s MeshService) LayerStream(request *v1.LayerStreamRequest, server v1.MeshService_LayerStreamServer) (err error)
- func (s MeshService) LayersQuery(ctx context.Context, request *v1.LayersQueryRequest) (result *v1.LayersQueryResponse, err error)
- func (s MeshService) MaxTransactionsPerSecond(ctx context.Context, request *v1.MaxTransactionsPerSecondRequest) (*v1.MaxTransactionsPerSecondResponse, error)
- func (s MeshService) NetId(ctx context.Context, request *v1.NetIdRequest) (*v1.NetIdResponse, error)
- type NodeService
- func (s NodeService) Build(ctx context.Context, in *empty.Empty) (*v1.BuildResponse, error)
- func (s NodeService) Echo(ctx context.Context, request *v1.EchoRequest) (*v1.EchoResponse, error)
- func (s NodeService) ErrorStream(request *v1.ErrorStreamRequest, server v1.NodeService_ErrorStreamServer) (err error)
- func (s NodeService) Shutdown(ctx context.Context, request *v1.ShutdownRequest) (result *v1.ShutdownResponse, err error)
- func (s NodeService) Status(ctx context.Context, request *v1.StatusRequest) (*v1.StatusResponse, error)
- func (s NodeService) StatusStream(request *v1.StatusStreamRequest, server v1.NodeService_StatusStreamServer) (err error)
- func (s NodeService) SyncStart(ctx context.Context, request *v1.SyncStartRequest) (result *v1.SyncStartResponse, err error)
- func (s NodeService) Version(ctx context.Context, in *empty.Empty) (*v1.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMocker ¶
InitMocker -
Types ¶
type GlobalStateService ¶
type GlobalStateService struct{}
GlobalStateService -
func (GlobalStateService) Account ¶
func (s GlobalStateService) Account(ctx context.Context, request *v1.AccountRequest) (*v1.AccountResponse, error)
Account info in the current global state.
func (GlobalStateService) AccountDataQuery ¶
func (s GlobalStateService) AccountDataQuery(ctx context.Context, request *v1.AccountDataQueryRequest) (*v1.AccountDataQueryResponse, error)
AccountDataQuery - Query for account related data such as rewards, tx receipts and account info
Note: it might be too expensive to add a param for layer to get these results from as it may require indexing all global state changes per account by layer. If it is possible to index by layer then we should add param start_layer to AccountDataParams. Currently it will return data from genesis.
func (GlobalStateService) AccountDataStream ¶
func (s GlobalStateService) AccountDataStream(request *v1.AccountDataStreamRequest, server v1.GlobalStateService_AccountDataStreamServer) error
AccountDataStream Get a stream of account related changes such as account balance change, tx receipts and rewards
func (GlobalStateService) AppEventStream ¶
func (s GlobalStateService) AppEventStream(request *v1.AppEventStreamRequest, server v1.GlobalStateService_AppEventStreamServer) error
AppEventStream App Events - emitted by app methods impl code trigged by an app transaction
func (GlobalStateService) GlobalStateHash ¶
func (s GlobalStateService) GlobalStateHash(ctx context.Context, request *v1.GlobalStateHashRequest) (*v1.GlobalStateHashResponse, error)
GlobalStateHash - Latest computed global state - layer and its root hash
func (GlobalStateService) GlobalStateStream ¶
func (s GlobalStateService) GlobalStateStream(request *v1.GlobalStateStreamRequest, server v1.GlobalStateService_GlobalStateStreamServer) (err error)
GlobalStateStream New global state computed for a layer by the STF
func (GlobalStateService) SmesherDataQuery ¶
func (s GlobalStateService) SmesherDataQuery(ctx context.Context, request *v1.SmesherDataQueryRequest) (*v1.SmesherDataQueryResponse, error)
SmesherDataQuery Query for smesher data. Currently returns smesher rewards. Note: Not supporting start_layer yet as it may require to index all rewards by smesher and by layer id or allow for queries from a layer and later....
func (GlobalStateService) SmesherRewardStream ¶
func (s GlobalStateService) SmesherRewardStream(request *v1.SmesherRewardStreamRequest, server v1.GlobalStateService_SmesherRewardStreamServer) error
SmesherRewardStream Rewards awarded to a smesher id
type MeshService ¶
type MeshService struct{}
MeshService -
func (MeshService) AccountMeshDataQuery ¶
func (s MeshService) AccountMeshDataQuery(ctx context.Context, request *v1.AccountMeshDataQueryRequest) (*v1.AccountMeshDataQueryResponse, error)
AccountMeshDataQuery Get account data query
func (MeshService) AccountMeshDataStream ¶
func (s MeshService) AccountMeshDataStream(request *v1.AccountMeshDataStreamRequest, server v1.MeshService_AccountMeshDataStreamServer) error
AccountMeshDataStream A stream of transactions and activations from an account. Includes simple coin transactions with the account as the destination.
func (MeshService) CurrentEpoch ¶
func (s MeshService) CurrentEpoch(ctx context.Context, request *v1.CurrentEpochRequest) (*v1.CurrentEpochResponse, error)
CurrentEpoch Current epoch number
func (MeshService) CurrentLayer ¶
func (s MeshService) CurrentLayer(ctx context.Context, request *v1.CurrentLayerRequest) (*v1.CurrentLayerResponse, error)
CurrentLayer Current layer number
func (MeshService) EpochNumLayers ¶
func (s MeshService) EpochNumLayers(ctx context.Context, request *v1.EpochNumLayersRequest) (*v1.EpochNumLayersResponse, error)
EpochNumLayers Number of layers per epoch (a network parameter)
func (MeshService) GenesisTime ¶
func (s MeshService) GenesisTime(ctx context.Context, request *v1.GenesisTimeRequest) (*v1.GenesisTimeResponse, error)
GenesisTime Network genesis time as unix epoch time
func (MeshService) LayerDuration ¶
func (s MeshService) LayerDuration(ctx context.Context, request *v1.LayerDurationRequest) (*v1.LayerDurationResponse, error)
LayerDuration Layer duration (a network parameter)
func (MeshService) LayerStream ¶
func (s MeshService) LayerStream(request *v1.LayerStreamRequest, server v1.MeshService_LayerStreamServer) (err error)
LayerStream Sent each time layer data changes. Designed for heavy-duty clients. Layer with blocks and transactions.
func (MeshService) LayersQuery ¶
func (s MeshService) LayersQuery(ctx context.Context, request *v1.LayersQueryRequest) (result *v1.LayersQueryResponse, err error)
LayersQuery Layers data query
func (MeshService) MaxTransactionsPerSecond ¶
func (s MeshService) MaxTransactionsPerSecond(ctx context.Context, request *v1.MaxTransactionsPerSecondRequest) (*v1.MaxTransactionsPerSecondResponse, error)
MaxTransactionsPerSecond Number of transactions per second (a network parameter)
func (MeshService) NetId ¶
func (s MeshService) NetId(ctx context.Context, request *v1.NetIdRequest) (*v1.NetIdResponse, error)
NetId Network ID
type NodeService ¶
type NodeService struct{}
NodeService -
func (NodeService) Build ¶
func (s NodeService) Build(ctx context.Context, in *empty.Empty) (*v1.BuildResponse, error)
Build returns the github tag or branch used to build the node
func (NodeService) Echo ¶
func (s NodeService) Echo(ctx context.Context, request *v1.EchoRequest) (*v1.EchoResponse, error)
Echo returns the response for an echo api request
func (NodeService) ErrorStream ¶
func (s NodeService) ErrorStream(request *v1.ErrorStreamRequest, server v1.NodeService_ErrorStreamServer) (err error)
ErrorStream node error events
func (NodeService) Shutdown ¶
func (s NodeService) Shutdown(ctx context.Context, request *v1.ShutdownRequest) (result *v1.ShutdownResponse, err error)
Shutdown Request that the node initiate graceful shutdown
func (NodeService) Status ¶
func (s NodeService) Status(ctx context.Context, request *v1.StatusRequest) (*v1.StatusResponse, error)
Status current node status
func (NodeService) StatusStream ¶
func (s NodeService) StatusStream(request *v1.StatusStreamRequest, server v1.NodeService_StatusStreamServer) (err error)
StatusStream sync status events
func (NodeService) SyncStart ¶
func (s NodeService) SyncStart(ctx context.Context, request *v1.SyncStartRequest) (result *v1.SyncStartResponse, err error)
SyncStart request that the node start syncing the mesh
func (NodeService) Version ¶
func (s NodeService) Version(ctx context.Context, in *empty.Empty) (*v1.VersionResponse, error)
Version returns the version of the node software as a semver string