services

package
v0.0.0-...-9a8596c Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGlobal

func InitGlobal(s *grpc.Server)

InitGlobal -

func InitMesh

func InitMesh(s *grpc.Server)

InitMesh -

func InitMocker

func InitMocker(server *grpc.Server, netId int, epochLayers int, maxTxs int, layerDuration int)

InitMocker -

func InitNode

func InitNode(s *grpc.Server)

InitNode -

Types

type GlobalStateService

type GlobalStateService struct{}

GlobalStateService -

func (GlobalStateService) Account

Account info in the current global state.

func (GlobalStateService) AccountDataQuery

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

AccountDataStream Get a stream of account related changes such as account balance change, tx receipts and rewards

func (GlobalStateService) AppEventStream

AppEventStream App Events - emitted by app methods impl code trigged by an app transaction

func (GlobalStateService) GlobalStateHash

GlobalStateHash - Latest computed global state - layer and its root hash

func (GlobalStateService) GlobalStateStream

GlobalStateStream New global state computed for a layer by the STF

func (GlobalStateService) SmesherDataQuery

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

SmesherRewardStream Rewards awarded to a smesher id

type MeshService

type MeshService struct{}

MeshService -

func (MeshService) AccountMeshDataQuery

AccountMeshDataQuery Get account data query

func (MeshService) AccountMeshDataStream

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

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

Jump to

Keyboard shortcuts

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