grpcserver

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 54 Imported by: 0

Documentation

Overview

Package config provides configuration for GRPC and HTTP api servers

Package grpcserver is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivationService added in v1.0.0

func NewActivationService(atxProvider atxProvider, goldenAtx types.ATXID) *activationService

Types

type AdminService added in v1.0.0

type AdminService struct {
	// contains filtered or unexported fields
}

AdminService exposes endpoints for node administration.

func NewAdminService added in v1.0.0

func NewAdminService(db *sql.Database, dataDir string, p peers) *AdminService

NewAdminService creates a new admin grpc service.

func (AdminService) CheckpointStream added in v1.0.0

func (AdminService) EventsStream added in v1.0.0

func (AdminService) PeerInfoStream added in v1.1.2

func (a AdminService) PeerInfoStream(_ *emptypb.Empty, stream pb.AdminService_PeerInfoStreamServer) error

func (AdminService) Recover added in v1.0.0

func (AdminService) RegisterHandlerService added in v1.3.0

func (s AdminService) RegisterHandlerService(mux *runtime.ServeMux) error

func (AdminService) RegisterService added in v1.0.0

func (a AdminService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (AdminService) String added in v1.3.0

func (a AdminService) String() string

String returns the name of this service.

type Config added in v1.0.0

type Config struct {
	PublicServices  []Service
	PublicListener  string `mapstructure:"grpc-public-listener"`
	PrivateServices []Service
	PrivateListener string `mapstructure:"grpc-private-listener"`
	PostServices    []Service
	PostListener    string    `mapstructure:"grpc-post-listener"`
	TLSServices     []Service `mapstructure:"grpc-tls-services"`
	TLSListener     string    `mapstructure:"grpc-tls-listener"`
	TLSCACert       string    `mapstructure:"grpc-tls-ca-cert"`
	TLSCert         string    `mapstructure:"grpc-tls-cert"`
	TLSKey          string    `mapstructure:"grpc-tls-key"`
	GrpcSendMsgSize int       `mapstructure:"grpc-send-msg-size"`
	GrpcRecvMsgSize int       `mapstructure:"grpc-recv-msg-size"`
	JSONListener    string    `mapstructure:"grpc-json-listener"`

	SmesherStreamInterval time.Duration `mapstructure:"smesherstreaminterval"`
}

func DefaultConfig added in v1.0.0

func DefaultConfig() Config

DefaultConfig defines the default configuration options for api.

func DefaultTestConfig added in v1.0.0

func DefaultTestConfig() Config

DefaultTestConfig returns the default config for tests.

type DebugService added in v0.1.16

type DebugService struct {
	// contains filtered or unexported fields
}

DebugService exposes global state data, output from the STF.

func NewDebugService added in v0.1.16

func NewDebugService(db *sql.Database, conState conservativeState, host networkInfo, oracle oracle,
	loggers map[string]*zap.AtomicLevel,
) *DebugService

NewDebugService creates a new grpc service using config data.

func (DebugService) Accounts added in v0.1.16

Accounts returns current counter and balance for all accounts.

func (DebugService) ActiveSet added in v1.0.0

ActiveSet query provides hare active set for the specified epoch.

func (DebugService) ChangeLogLevel added in v1.4.0

func (d DebugService) ChangeLogLevel(ctx context.Context, req *pb.ChangeLogLevelRequest) (*emptypb.Empty, error)

func (DebugService) NetworkInfo added in v1.0.0

func (d DebugService) NetworkInfo(ctx context.Context, _ *emptypb.Empty) (*pb.NetworkInfoResponse, error)

NetworkInfo query provides NetworkInfoResponse.

func (DebugService) ProposalsStream added in v1.0.0

func (d DebugService) ProposalsStream(_ *emptypb.Empty, stream pb.DebugService_ProposalsStreamServer) error

ProposalsStream streams all proposals confirmed by hare.

func (DebugService) RegisterHandlerService added in v1.3.0

func (s DebugService) RegisterHandlerService(mux *runtime.ServeMux) error

func (DebugService) RegisterService added in v0.1.16

func (d DebugService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (DebugService) String added in v1.3.0

func (d DebugService) String() string

String returns the name of this service.

type GlobalStateService

type GlobalStateService struct {
	// contains filtered or unexported fields
}

GlobalStateService exposes global state data, output from the STF.

func NewGlobalStateService

func NewGlobalStateService(msh meshAPI, conState conservativeState) *GlobalStateService

NewGlobalStateService creates a new grpc service using config data.

func (GlobalStateService) Account

Account returns current and projected counter and balance for one account.

func (GlobalStateService) AccountDataQuery

AccountDataQuery returns historical account data such as rewards and receipts.

func (GlobalStateService) AccountDataStream

AccountDataStream exposes a stream of account-related data.

func (GlobalStateService) AppEventStream

AppEventStream exposes a stream of emitted app events.

func (GlobalStateService) GlobalStateHash

GlobalStateHash returns the latest layer and its computed global state hash.

func (GlobalStateService) GlobalStateStream

GlobalStateStream exposes a stream of global data data items: rewards, receipts, account info, global state hash.

func (GlobalStateService) RegisterHandlerService added in v1.3.0

func (s GlobalStateService) RegisterHandlerService(mux *runtime.ServeMux) error

func (GlobalStateService) RegisterService

func (s GlobalStateService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (GlobalStateService) SmesherDataQuery

SmesherDataQuery returns historical info on smesher rewards.

func (GlobalStateService) SmesherRewardStream

SmesherRewardStream exposes a stream of smesher rewards.

func (GlobalStateService) String added in v1.3.0

func (s GlobalStateService) String() string

String returns the name of the service.

type JSONHTTPServer

type JSONHTTPServer struct {

	// BoundAddress contains the address that the server bound to, useful if
	// the server uses a dynamic port. It is set during startup and can be
	// safely accessed after Start has completed (I.E. the returned channel has
	// been waited on)
	BoundAddress string
	// contains filtered or unexported fields
}

JSONHTTPServer is a JSON http server providing the Spacemesh API. It is implemented using a grpc-gateway. See https://github.com/grpc-ecosystem/grpc-gateway .

func NewJSONHTTPServer

func NewJSONHTTPServer(listener string, lg *zap.Logger) *JSONHTTPServer

NewJSONHTTPServer creates a new json http server.

func (*JSONHTTPServer) Shutdown added in v1.0.0

func (s *JSONHTTPServer) Shutdown(ctx context.Context) error

Shutdown stops the server.

func (*JSONHTTPServer) StartService

func (s *JSONHTTPServer) StartService(
	ctx context.Context,
	services ...ServiceAPI,
) error

StartService starts the json api server and listens for status (started, stopped).

type MeshService

type MeshService struct {
	// contains filtered or unexported fields
}

MeshService exposes mesh data such as accounts, blocks, and transactions.

func NewMeshService

func NewMeshService(
	cdb *datastore.CachedDB,
	msh meshAPI,
	cstate conservativeState,
	genTime genesisTimeAPI,
	layersPerEpoch uint32,
	genesisID types.Hash20,
	layerDuration time.Duration,
	layerAvgSize,
	txsPerProposal uint32,
) *MeshService

NewMeshService creates a new service using config data.

func (MeshService) AccountMeshDataQuery

AccountMeshDataQuery returns account data.

func (MeshService) AccountMeshDataStream

AccountMeshDataStream exposes a stream of transactions and activations for an account.

func (MeshService) CurrentEpoch

CurrentEpoch returns the current epoch number.

func (MeshService) CurrentLayer

CurrentLayer returns the current layer number.

func (MeshService) EpochNumLayers

EpochNumLayers returns the number of layers per epoch (a network parameter).

func (MeshService) EpochStream added in v1.0.0

func (MeshService) GenesisID added in v1.0.0

GenesisID returns the network ID.

func (MeshService) GenesisTime

GenesisTime returns the network genesis time as UNIX time.

func (MeshService) LayerDuration

LayerDuration returns the layer duration in seconds (a network parameter).

func (MeshService) LayerStream

LayerStream exposes a stream of all mesh data per layer.

func (MeshService) LayersQuery

LayersQuery returns all mesh data, layer by layer.

func (MeshService) MalfeasanceQuery added in v1.1.0

func (s MeshService) MalfeasanceQuery(
	ctx context.Context,
	req *pb.MalfeasanceRequest,
) (*pb.MalfeasanceResponse, error)

func (MeshService) MalfeasanceStream added in v1.1.0

func (MeshService) MaxTransactionsPerSecond

MaxTransactionsPerSecond returns the max number of tx per sec (a network parameter).

func (MeshService) RegisterHandlerService added in v1.3.0

func (s MeshService) RegisterHandlerService(mux *runtime.ServeMux) error

func (MeshService) RegisterService

func (s MeshService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (MeshService) String added in v1.3.0

func (s MeshService) String() string

String returns the name of this service.

type MockatxProvider added in v1.0.0

type MockatxProvider struct {
	// contains filtered or unexported fields
}

MockatxProvider is a mock of atxProvider interface.

func NewMockatxProvider added in v1.0.0

func NewMockatxProvider(ctrl *gomock.Controller) *MockatxProvider

NewMockatxProvider creates a new mock instance.

func (*MockatxProvider) EXPECT added in v1.0.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockatxProvider) GetFullAtx added in v1.0.0

GetFullAtx mocks base method.

func (*MockatxProvider) GetMalfeasanceProof added in v1.1.0

func (m *MockatxProvider) GetMalfeasanceProof(id types.NodeID) (*types.MalfeasanceProof, error)

GetMalfeasanceProof mocks base method.

func (*MockatxProvider) MaxHeightAtx added in v1.0.0

func (m *MockatxProvider) MaxHeightAtx() (types.ATXID, error)

MaxHeightAtx mocks base method.

type MockatxProviderGetFullAtxCall added in v1.4.0

type MockatxProviderGetFullAtxCall struct {
	*gomock.Call
}

MockatxProviderGetFullAtxCall wrap *gomock.Call

func (*MockatxProviderGetFullAtxCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockatxProviderGetFullAtxCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockatxProviderGetFullAtxCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockatxProviderGetMalfeasanceProofCall added in v1.4.0

type MockatxProviderGetMalfeasanceProofCall struct {
	*gomock.Call
}

MockatxProviderGetMalfeasanceProofCall wrap *gomock.Call

func (*MockatxProviderGetMalfeasanceProofCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockatxProviderGetMalfeasanceProofCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockatxProviderGetMalfeasanceProofCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockatxProviderMaxHeightAtxCall added in v1.4.0

type MockatxProviderMaxHeightAtxCall struct {
	*gomock.Call
}

MockatxProviderMaxHeightAtxCall wrap *gomock.Call

func (*MockatxProviderMaxHeightAtxCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockatxProviderMaxHeightAtxCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockatxProviderMaxHeightAtxCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockatxProviderMockRecorder added in v1.0.0

type MockatxProviderMockRecorder struct {
	// contains filtered or unexported fields
}

MockatxProviderMockRecorder is the mock recorder for MockatxProvider.

func (*MockatxProviderMockRecorder) GetFullAtx added in v1.0.0

GetFullAtx indicates an expected call of GetFullAtx.

func (*MockatxProviderMockRecorder) GetMalfeasanceProof added in v1.1.0

GetMalfeasanceProof indicates an expected call of GetMalfeasanceProof.

func (*MockatxProviderMockRecorder) MaxHeightAtx added in v1.0.0

MaxHeightAtx indicates an expected call of MaxHeightAtx.

type MockconservativeState added in v1.0.0

type MockconservativeState struct {
	// contains filtered or unexported fields
}

MockconservativeState is a mock of conservativeState interface.

func NewMockconservativeState added in v1.0.0

func NewMockconservativeState(ctrl *gomock.Controller) *MockconservativeState

NewMockconservativeState creates a new mock instance.

func (*MockconservativeState) EXPECT added in v1.0.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockconservativeState) GetAllAccounts added in v1.0.0

func (m *MockconservativeState) GetAllAccounts() ([]*types.Account, error)

GetAllAccounts mocks base method.

func (*MockconservativeState) GetBalance added in v1.0.0

func (m *MockconservativeState) GetBalance(arg0 types.Address) (uint64, error)

GetBalance mocks base method.

func (*MockconservativeState) GetLayerStateRoot added in v1.0.0

func (m *MockconservativeState) GetLayerStateRoot(arg0 types.LayerID) (types.Hash32, error)

GetLayerStateRoot mocks base method.

func (*MockconservativeState) GetMeshTransaction added in v1.0.0

func (m *MockconservativeState) GetMeshTransaction(arg0 types.TransactionID) (*types.MeshTransaction, error)

GetMeshTransaction mocks base method.

func (*MockconservativeState) GetMeshTransactions added in v1.0.0

func (m *MockconservativeState) GetMeshTransactions(arg0 []types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})

GetMeshTransactions mocks base method.

func (*MockconservativeState) GetNonce added in v1.0.0

func (m *MockconservativeState) GetNonce(arg0 types.Address) (types.Nonce, error)

GetNonce mocks base method.

func (*MockconservativeState) GetProjection added in v1.0.0

func (m *MockconservativeState) GetProjection(arg0 types.Address) (uint64, uint64)

GetProjection mocks base method.

func (*MockconservativeState) GetStateRoot added in v1.0.0

func (m *MockconservativeState) GetStateRoot() (types.Hash32, error)

GetStateRoot mocks base method.

func (*MockconservativeState) GetTransactionsByAddress added in v1.0.0

func (m *MockconservativeState) GetTransactionsByAddress(arg0, arg1 types.LayerID, arg2 types.Address) ([]*types.MeshTransaction, error)

GetTransactionsByAddress mocks base method.

func (*MockconservativeState) Validation added in v1.0.0

Validation mocks base method.

type MockconservativeStateGetAllAccountsCall added in v1.4.0

type MockconservativeStateGetAllAccountsCall struct {
	*gomock.Call
}

MockconservativeStateGetAllAccountsCall wrap *gomock.Call

func (*MockconservativeStateGetAllAccountsCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetAllAccountsCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetAllAccountsCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateGetBalanceCall added in v1.4.0

type MockconservativeStateGetBalanceCall struct {
	*gomock.Call
}

MockconservativeStateGetBalanceCall wrap *gomock.Call

func (*MockconservativeStateGetBalanceCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetBalanceCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetBalanceCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateGetLayerStateRootCall added in v1.4.0

type MockconservativeStateGetLayerStateRootCall struct {
	*gomock.Call
}

MockconservativeStateGetLayerStateRootCall wrap *gomock.Call

func (*MockconservativeStateGetLayerStateRootCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetLayerStateRootCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetLayerStateRootCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateGetMeshTransactionCall added in v1.4.0

type MockconservativeStateGetMeshTransactionCall struct {
	*gomock.Call
}

MockconservativeStateGetMeshTransactionCall wrap *gomock.Call

func (*MockconservativeStateGetMeshTransactionCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetMeshTransactionCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetMeshTransactionCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateGetMeshTransactionsCall added in v1.4.0

type MockconservativeStateGetMeshTransactionsCall struct {
	*gomock.Call
}

MockconservativeStateGetMeshTransactionsCall wrap *gomock.Call

func (*MockconservativeStateGetMeshTransactionsCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetMeshTransactionsCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetMeshTransactionsCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateGetNonceCall added in v1.4.0

type MockconservativeStateGetNonceCall struct {
	*gomock.Call
}

MockconservativeStateGetNonceCall wrap *gomock.Call

func (*MockconservativeStateGetNonceCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetNonceCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetNonceCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateGetProjectionCall added in v1.4.0

type MockconservativeStateGetProjectionCall struct {
	*gomock.Call
}

MockconservativeStateGetProjectionCall wrap *gomock.Call

func (*MockconservativeStateGetProjectionCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetProjectionCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetProjectionCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateGetStateRootCall added in v1.4.0

type MockconservativeStateGetStateRootCall struct {
	*gomock.Call
}

MockconservativeStateGetStateRootCall wrap *gomock.Call

func (*MockconservativeStateGetStateRootCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetStateRootCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetStateRootCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateGetTransactionsByAddressCall added in v1.4.0

type MockconservativeStateGetTransactionsByAddressCall struct {
	*gomock.Call
}

MockconservativeStateGetTransactionsByAddressCall wrap *gomock.Call

func (*MockconservativeStateGetTransactionsByAddressCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateGetTransactionsByAddressCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateGetTransactionsByAddressCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockconservativeStateMockRecorder added in v1.0.0

type MockconservativeStateMockRecorder struct {
	// contains filtered or unexported fields
}

MockconservativeStateMockRecorder is the mock recorder for MockconservativeState.

func (*MockconservativeStateMockRecorder) GetAllAccounts added in v1.0.0

GetAllAccounts indicates an expected call of GetAllAccounts.

func (*MockconservativeStateMockRecorder) GetBalance added in v1.0.0

GetBalance indicates an expected call of GetBalance.

func (*MockconservativeStateMockRecorder) GetLayerStateRoot added in v1.0.0

GetLayerStateRoot indicates an expected call of GetLayerStateRoot.

func (*MockconservativeStateMockRecorder) GetMeshTransaction added in v1.0.0

GetMeshTransaction indicates an expected call of GetMeshTransaction.

func (*MockconservativeStateMockRecorder) GetMeshTransactions added in v1.0.0

GetMeshTransactions indicates an expected call of GetMeshTransactions.

func (*MockconservativeStateMockRecorder) GetNonce added in v1.0.0

GetNonce indicates an expected call of GetNonce.

func (*MockconservativeStateMockRecorder) GetProjection added in v1.0.0

GetProjection indicates an expected call of GetProjection.

func (*MockconservativeStateMockRecorder) GetStateRoot added in v1.0.0

GetStateRoot indicates an expected call of GetStateRoot.

func (*MockconservativeStateMockRecorder) GetTransactionsByAddress added in v1.0.0

func (mr *MockconservativeStateMockRecorder) GetTransactionsByAddress(arg0, arg1, arg2 any) *MockconservativeStateGetTransactionsByAddressCall

GetTransactionsByAddress indicates an expected call of GetTransactionsByAddress.

func (*MockconservativeStateMockRecorder) Validation added in v1.0.0

Validation indicates an expected call of Validation.

type MockconservativeStateValidationCall added in v1.4.0

type MockconservativeStateValidationCall struct {
	*gomock.Call
}

MockconservativeStateValidationCall wrap *gomock.Call

func (*MockconservativeStateValidationCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockconservativeStateValidationCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockconservativeStateValidationCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockgenesisTimeAPI added in v1.0.0

type MockgenesisTimeAPI struct {
	// contains filtered or unexported fields
}

MockgenesisTimeAPI is a mock of genesisTimeAPI interface.

func NewMockgenesisTimeAPI added in v1.0.0

func NewMockgenesisTimeAPI(ctrl *gomock.Controller) *MockgenesisTimeAPI

NewMockgenesisTimeAPI creates a new mock instance.

func (*MockgenesisTimeAPI) CurrentLayer added in v1.0.0

func (m *MockgenesisTimeAPI) CurrentLayer() types.LayerID

CurrentLayer mocks base method.

func (*MockgenesisTimeAPI) EXPECT added in v1.0.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockgenesisTimeAPI) GenesisTime added in v1.0.0

func (m *MockgenesisTimeAPI) GenesisTime() time.Time

GenesisTime mocks base method.

type MockgenesisTimeAPICurrentLayerCall added in v1.4.0

type MockgenesisTimeAPICurrentLayerCall struct {
	*gomock.Call
}

MockgenesisTimeAPICurrentLayerCall wrap *gomock.Call

func (*MockgenesisTimeAPICurrentLayerCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockgenesisTimeAPICurrentLayerCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockgenesisTimeAPICurrentLayerCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockgenesisTimeAPIGenesisTimeCall added in v1.4.0

type MockgenesisTimeAPIGenesisTimeCall struct {
	*gomock.Call
}

MockgenesisTimeAPIGenesisTimeCall wrap *gomock.Call

func (*MockgenesisTimeAPIGenesisTimeCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockgenesisTimeAPIGenesisTimeCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockgenesisTimeAPIGenesisTimeCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockgenesisTimeAPIMockRecorder added in v1.0.0

type MockgenesisTimeAPIMockRecorder struct {
	// contains filtered or unexported fields
}

MockgenesisTimeAPIMockRecorder is the mock recorder for MockgenesisTimeAPI.

func (*MockgenesisTimeAPIMockRecorder) CurrentLayer added in v1.0.0

CurrentLayer indicates an expected call of CurrentLayer.

func (*MockgenesisTimeAPIMockRecorder) GenesisTime added in v1.0.0

GenesisTime indicates an expected call of GenesisTime.

type MockgrpcPostService added in v1.4.5

type MockgrpcPostService struct {
	// contains filtered or unexported fields
}

MockgrpcPostService is a mock of grpcPostService interface.

func NewMockgrpcPostService added in v1.4.5

func NewMockgrpcPostService(ctrl *gomock.Controller) *MockgrpcPostService

NewMockgrpcPostService creates a new mock instance.

func (*MockgrpcPostService) AllowConnections added in v1.4.5

func (m *MockgrpcPostService) AllowConnections(allow bool)

AllowConnections mocks base method.

func (*MockgrpcPostService) EXPECT added in v1.4.5

EXPECT returns an object that allows the caller to indicate expected use.

type MockgrpcPostServiceAllowConnectionsCall added in v1.4.5

type MockgrpcPostServiceAllowConnectionsCall struct {
	*gomock.Call
}

MockgrpcPostServiceAllowConnectionsCall wrap *gomock.Call

func (*MockgrpcPostServiceAllowConnectionsCall) Do added in v1.4.5

Do rewrite *gomock.Call.Do

func (*MockgrpcPostServiceAllowConnectionsCall) DoAndReturn added in v1.4.5

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockgrpcPostServiceAllowConnectionsCall) Return added in v1.4.5

Return rewrite *gomock.Call.Return

type MockgrpcPostServiceMockRecorder added in v1.4.5

type MockgrpcPostServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockgrpcPostServiceMockRecorder is the mock recorder for MockgrpcPostService.

func (*MockgrpcPostServiceMockRecorder) AllowConnections added in v1.4.5

AllowConnections indicates an expected call of AllowConnections.

type MockmeshAPI added in v1.0.0

type MockmeshAPI struct {
	// contains filtered or unexported fields
}

MockmeshAPI is a mock of meshAPI interface.

func NewMockmeshAPI added in v1.0.0

func NewMockmeshAPI(ctrl *gomock.Controller) *MockmeshAPI

NewMockmeshAPI creates a new mock instance.

func (*MockmeshAPI) EXPECT added in v1.0.0

func (m *MockmeshAPI) EXPECT() *MockmeshAPIMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockmeshAPI) GetLayer added in v1.0.0

func (m *MockmeshAPI) GetLayer(arg0 types.LayerID) (*types.Layer, error)

GetLayer mocks base method.

func (*MockmeshAPI) GetLayerVerified added in v1.3.3

func (m *MockmeshAPI) GetLayerVerified(arg0 types.LayerID) (*types.Block, error)

GetLayerVerified mocks base method.

func (*MockmeshAPI) GetRewardsByCoinbase added in v1.3.0

func (m *MockmeshAPI) GetRewardsByCoinbase(arg0 types.Address) ([]*types.Reward, error)

GetRewardsByCoinbase mocks base method.

func (*MockmeshAPI) GetRewardsBySmesherId added in v1.3.0

func (m *MockmeshAPI) GetRewardsBySmesherId(id types.NodeID) ([]*types.Reward, error)

GetRewardsBySmesherId mocks base method.

func (*MockmeshAPI) LatestLayer added in v1.0.0

func (m *MockmeshAPI) LatestLayer() types.LayerID

LatestLayer mocks base method.

func (*MockmeshAPI) LatestLayerInState added in v1.0.0

func (m *MockmeshAPI) LatestLayerInState() types.LayerID

LatestLayerInState mocks base method.

func (*MockmeshAPI) MeshHash added in v1.0.0

func (m *MockmeshAPI) MeshHash(arg0 types.LayerID) (types.Hash32, error)

MeshHash mocks base method.

func (*MockmeshAPI) ProcessedLayer added in v1.0.0

func (m *MockmeshAPI) ProcessedLayer() types.LayerID

ProcessedLayer mocks base method.

type MockmeshAPIGetLayerCall added in v1.4.0

type MockmeshAPIGetLayerCall struct {
	*gomock.Call
}

MockmeshAPIGetLayerCall wrap *gomock.Call

func (*MockmeshAPIGetLayerCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockmeshAPIGetLayerCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockmeshAPIGetLayerCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockmeshAPIGetLayerVerifiedCall added in v1.4.0

type MockmeshAPIGetLayerVerifiedCall struct {
	*gomock.Call
}

MockmeshAPIGetLayerVerifiedCall wrap *gomock.Call

func (*MockmeshAPIGetLayerVerifiedCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockmeshAPIGetLayerVerifiedCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockmeshAPIGetLayerVerifiedCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockmeshAPIGetRewardsByCoinbaseCall added in v1.4.0

type MockmeshAPIGetRewardsByCoinbaseCall struct {
	*gomock.Call
}

MockmeshAPIGetRewardsByCoinbaseCall wrap *gomock.Call

func (*MockmeshAPIGetRewardsByCoinbaseCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockmeshAPIGetRewardsByCoinbaseCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockmeshAPIGetRewardsByCoinbaseCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockmeshAPIGetRewardsBySmesherIdCall added in v1.4.0

type MockmeshAPIGetRewardsBySmesherIdCall struct {
	*gomock.Call
}

MockmeshAPIGetRewardsBySmesherIdCall wrap *gomock.Call

func (*MockmeshAPIGetRewardsBySmesherIdCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockmeshAPIGetRewardsBySmesherIdCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockmeshAPIGetRewardsBySmesherIdCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockmeshAPILatestLayerCall added in v1.4.0

type MockmeshAPILatestLayerCall struct {
	*gomock.Call
}

MockmeshAPILatestLayerCall wrap *gomock.Call

func (*MockmeshAPILatestLayerCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockmeshAPILatestLayerCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockmeshAPILatestLayerCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockmeshAPILatestLayerInStateCall added in v1.4.0

type MockmeshAPILatestLayerInStateCall struct {
	*gomock.Call
}

MockmeshAPILatestLayerInStateCall wrap *gomock.Call

func (*MockmeshAPILatestLayerInStateCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockmeshAPILatestLayerInStateCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockmeshAPILatestLayerInStateCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockmeshAPIMeshHashCall added in v1.4.0

type MockmeshAPIMeshHashCall struct {
	*gomock.Call
}

MockmeshAPIMeshHashCall wrap *gomock.Call

func (*MockmeshAPIMeshHashCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockmeshAPIMeshHashCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockmeshAPIMeshHashCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockmeshAPIMockRecorder added in v1.0.0

type MockmeshAPIMockRecorder struct {
	// contains filtered or unexported fields
}

MockmeshAPIMockRecorder is the mock recorder for MockmeshAPI.

func (*MockmeshAPIMockRecorder) GetLayer added in v1.0.0

GetLayer indicates an expected call of GetLayer.

func (*MockmeshAPIMockRecorder) GetLayerVerified added in v1.3.3

func (mr *MockmeshAPIMockRecorder) GetLayerVerified(arg0 any) *MockmeshAPIGetLayerVerifiedCall

GetLayerVerified indicates an expected call of GetLayerVerified.

func (*MockmeshAPIMockRecorder) GetRewardsByCoinbase added in v1.3.0

func (mr *MockmeshAPIMockRecorder) GetRewardsByCoinbase(arg0 any) *MockmeshAPIGetRewardsByCoinbaseCall

GetRewardsByCoinbase indicates an expected call of GetRewardsByCoinbase.

func (*MockmeshAPIMockRecorder) GetRewardsBySmesherId added in v1.3.0

func (mr *MockmeshAPIMockRecorder) GetRewardsBySmesherId(id any) *MockmeshAPIGetRewardsBySmesherIdCall

GetRewardsBySmesherId indicates an expected call of GetRewardsBySmesherId.

func (*MockmeshAPIMockRecorder) LatestLayer added in v1.0.0

LatestLayer indicates an expected call of LatestLayer.

func (*MockmeshAPIMockRecorder) LatestLayerInState added in v1.0.0

LatestLayerInState indicates an expected call of LatestLayerInState.

func (*MockmeshAPIMockRecorder) MeshHash added in v1.0.0

MeshHash indicates an expected call of MeshHash.

func (*MockmeshAPIMockRecorder) ProcessedLayer added in v1.0.0

ProcessedLayer indicates an expected call of ProcessedLayer.

type MockmeshAPIProcessedLayerCall added in v1.4.0

type MockmeshAPIProcessedLayerCall struct {
	*gomock.Call
}

MockmeshAPIProcessedLayerCall wrap *gomock.Call

func (*MockmeshAPIProcessedLayerCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockmeshAPIProcessedLayerCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockmeshAPIProcessedLayerCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MocknetworkInfo added in v1.3.0

type MocknetworkInfo struct {
	// contains filtered or unexported fields
}

MocknetworkInfo is a mock of networkInfo interface.

func NewMocknetworkInfo added in v1.3.0

func NewMocknetworkInfo(ctrl *gomock.Controller) *MocknetworkInfo

NewMocknetworkInfo creates a new mock instance.

func (*MocknetworkInfo) DHTServerEnabled added in v1.3.0

func (m *MocknetworkInfo) DHTServerEnabled() bool

DHTServerEnabled mocks base method.

func (*MocknetworkInfo) EXPECT added in v1.3.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MocknetworkInfo) ID added in v1.3.0

func (m *MocknetworkInfo) ID() p2p.Peer

ID mocks base method.

func (*MocknetworkInfo) KnownAddresses added in v1.3.0

func (m *MocknetworkInfo) KnownAddresses() []multiaddr.Multiaddr

KnownAddresses mocks base method.

func (*MocknetworkInfo) ListenAddresses added in v1.3.0

func (m *MocknetworkInfo) ListenAddresses() []multiaddr.Multiaddr

ListenAddresses mocks base method.

func (*MocknetworkInfo) NATDeviceType added in v1.3.0

NATDeviceType mocks base method.

func (*MocknetworkInfo) Reachability added in v1.3.0

func (m *MocknetworkInfo) Reachability() network.Reachability

Reachability mocks base method.

type MocknetworkInfoDHTServerEnabledCall added in v1.4.0

type MocknetworkInfoDHTServerEnabledCall struct {
	*gomock.Call
}

MocknetworkInfoDHTServerEnabledCall wrap *gomock.Call

func (*MocknetworkInfoDHTServerEnabledCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MocknetworkInfoDHTServerEnabledCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocknetworkInfoDHTServerEnabledCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MocknetworkInfoIDCall added in v1.4.0

type MocknetworkInfoIDCall struct {
	*gomock.Call
}

MocknetworkInfoIDCall wrap *gomock.Call

func (*MocknetworkInfoIDCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MocknetworkInfoIDCall) DoAndReturn added in v1.4.0

func (c *MocknetworkInfoIDCall) DoAndReturn(f func() p2p.Peer) *MocknetworkInfoIDCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocknetworkInfoIDCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MocknetworkInfoKnownAddressesCall added in v1.4.0

type MocknetworkInfoKnownAddressesCall struct {
	*gomock.Call
}

MocknetworkInfoKnownAddressesCall wrap *gomock.Call

func (*MocknetworkInfoKnownAddressesCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MocknetworkInfoKnownAddressesCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocknetworkInfoKnownAddressesCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MocknetworkInfoListenAddressesCall added in v1.4.0

type MocknetworkInfoListenAddressesCall struct {
	*gomock.Call
}

MocknetworkInfoListenAddressesCall wrap *gomock.Call

func (*MocknetworkInfoListenAddressesCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MocknetworkInfoListenAddressesCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocknetworkInfoListenAddressesCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MocknetworkInfoMockRecorder added in v1.3.0

type MocknetworkInfoMockRecorder struct {
	// contains filtered or unexported fields
}

MocknetworkInfoMockRecorder is the mock recorder for MocknetworkInfo.

func (*MocknetworkInfoMockRecorder) DHTServerEnabled added in v1.3.0

DHTServerEnabled indicates an expected call of DHTServerEnabled.

func (*MocknetworkInfoMockRecorder) ID added in v1.3.0

ID indicates an expected call of ID.

func (*MocknetworkInfoMockRecorder) KnownAddresses added in v1.3.0

KnownAddresses indicates an expected call of KnownAddresses.

func (*MocknetworkInfoMockRecorder) ListenAddresses added in v1.3.0

ListenAddresses indicates an expected call of ListenAddresses.

func (*MocknetworkInfoMockRecorder) NATDeviceType added in v1.3.0

NATDeviceType indicates an expected call of NATDeviceType.

func (*MocknetworkInfoMockRecorder) Reachability added in v1.3.0

Reachability indicates an expected call of Reachability.

type MocknetworkInfoNATDeviceTypeCall added in v1.4.0

type MocknetworkInfoNATDeviceTypeCall struct {
	*gomock.Call
}

MocknetworkInfoNATDeviceTypeCall wrap *gomock.Call

func (*MocknetworkInfoNATDeviceTypeCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MocknetworkInfoNATDeviceTypeCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocknetworkInfoNATDeviceTypeCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MocknetworkInfoReachabilityCall added in v1.4.0

type MocknetworkInfoReachabilityCall struct {
	*gomock.Call
}

MocknetworkInfoReachabilityCall wrap *gomock.Call

func (*MocknetworkInfoReachabilityCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MocknetworkInfoReachabilityCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocknetworkInfoReachabilityCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type Mockoracle added in v1.0.0

type Mockoracle struct {
	// contains filtered or unexported fields
}

Mockoracle is a mock of oracle interface.

func NewMockoracle added in v1.0.0

func NewMockoracle(ctrl *gomock.Controller) *Mockoracle

NewMockoracle creates a new mock instance.

func (*Mockoracle) ActiveSet added in v1.0.0

func (m *Mockoracle) ActiveSet(arg0 context.Context, arg1 types.EpochID) ([]types.ATXID, error)

ActiveSet mocks base method.

func (*Mockoracle) EXPECT added in v1.0.0

func (m *Mockoracle) EXPECT() *MockoracleMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockoracleActiveSetCall added in v1.4.0

type MockoracleActiveSetCall struct {
	*gomock.Call
}

MockoracleActiveSetCall wrap *gomock.Call

func (*MockoracleActiveSetCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockoracleActiveSetCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockoracleActiveSetCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockoracleMockRecorder added in v1.0.0

type MockoracleMockRecorder struct {
	// contains filtered or unexported fields
}

MockoracleMockRecorder is the mock recorder for Mockoracle.

func (*MockoracleMockRecorder) ActiveSet added in v1.0.0

func (mr *MockoracleMockRecorder) ActiveSet(arg0, arg1 any) *MockoracleActiveSetCall

ActiveSet indicates an expected call of ActiveSet.

type MockpeerCounter added in v1.0.0

type MockpeerCounter struct {
	// contains filtered or unexported fields
}

MockpeerCounter is a mock of peerCounter interface.

func NewMockpeerCounter added in v1.0.0

func NewMockpeerCounter(ctrl *gomock.Controller) *MockpeerCounter

NewMockpeerCounter creates a new mock instance.

func (*MockpeerCounter) EXPECT added in v1.0.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockpeerCounter) PeerCount added in v1.0.0

func (m *MockpeerCounter) PeerCount() uint64

PeerCount mocks base method.

type MockpeerCounterMockRecorder added in v1.0.0

type MockpeerCounterMockRecorder struct {
	// contains filtered or unexported fields
}

MockpeerCounterMockRecorder is the mock recorder for MockpeerCounter.

func (*MockpeerCounterMockRecorder) PeerCount added in v1.0.0

PeerCount indicates an expected call of PeerCount.

type MockpeerCounterPeerCountCall added in v1.4.0

type MockpeerCounterPeerCountCall struct {
	*gomock.Call
}

MockpeerCounterPeerCountCall wrap *gomock.Call

func (*MockpeerCounterPeerCountCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpeerCounterPeerCountCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpeerCounterPeerCountCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type Mockpeers added in v1.1.2

type Mockpeers struct {
	// contains filtered or unexported fields
}

Mockpeers is a mock of peers interface.

func NewMockpeers added in v1.1.2

func NewMockpeers(ctrl *gomock.Controller) *Mockpeers

NewMockpeers creates a new mock instance.

func (*Mockpeers) ConnectedPeerInfo added in v1.1.2

func (m *Mockpeers) ConnectedPeerInfo(arg0 p2p.Peer) *p2p.PeerInfo

ConnectedPeerInfo mocks base method.

func (*Mockpeers) EXPECT added in v1.1.2

func (m *Mockpeers) EXPECT() *MockpeersMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*Mockpeers) GetPeers added in v1.1.2

func (m *Mockpeers) GetPeers() []p2p.Peer

GetPeers mocks base method.

type MockpeersConnectedPeerInfoCall added in v1.4.0

type MockpeersConnectedPeerInfoCall struct {
	*gomock.Call
}

MockpeersConnectedPeerInfoCall wrap *gomock.Call

func (*MockpeersConnectedPeerInfoCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpeersConnectedPeerInfoCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpeersConnectedPeerInfoCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockpeersGetPeersCall added in v1.4.0

type MockpeersGetPeersCall struct {
	*gomock.Call
}

MockpeersGetPeersCall wrap *gomock.Call

func (*MockpeersGetPeersCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpeersGetPeersCall) DoAndReturn added in v1.4.0

func (c *MockpeersGetPeersCall) DoAndReturn(f func() []p2p.Peer) *MockpeersGetPeersCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpeersGetPeersCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockpeersMockRecorder added in v1.1.2

type MockpeersMockRecorder struct {
	// contains filtered or unexported fields
}

MockpeersMockRecorder is the mock recorder for Mockpeers.

func (*MockpeersMockRecorder) ConnectedPeerInfo added in v1.1.2

func (mr *MockpeersMockRecorder) ConnectedPeerInfo(arg0 any) *MockpeersConnectedPeerInfoCall

ConnectedPeerInfo indicates an expected call of ConnectedPeerInfo.

func (*MockpeersMockRecorder) GetPeers added in v1.1.2

GetPeers indicates an expected call of GetPeers.

type MockpostState added in v1.4.0

type MockpostState struct {
	// contains filtered or unexported fields
}

MockpostState is a mock of postState interface.

func NewMockpostState added in v1.4.0

func NewMockpostState(ctrl *gomock.Controller) *MockpostState

NewMockpostState creates a new mock instance.

func (*MockpostState) EXPECT added in v1.4.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockpostState) PostStates added in v1.4.0

PostStates mocks base method.

type MockpostStateMockRecorder added in v1.4.0

type MockpostStateMockRecorder struct {
	// contains filtered or unexported fields
}

MockpostStateMockRecorder is the mock recorder for MockpostState.

func (*MockpostStateMockRecorder) PostStates added in v1.4.0

PostStates indicates an expected call of PostStates.

type MockpostStatePostStatesCall added in v1.4.0

type MockpostStatePostStatesCall struct {
	*gomock.Call
}

MockpostStatePostStatesCall wrap *gomock.Call

func (*MockpostStatePostStatesCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpostStatePostStatesCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpostStatePostStatesCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockpostSupervisor added in v1.3.0

type MockpostSupervisor struct {
	// contains filtered or unexported fields
}

MockpostSupervisor is a mock of postSupervisor interface.

func NewMockpostSupervisor added in v1.3.0

func NewMockpostSupervisor(ctrl *gomock.Controller) *MockpostSupervisor

NewMockpostSupervisor creates a new mock instance.

func (*MockpostSupervisor) Benchmark added in v1.3.0

Benchmark mocks base method.

func (*MockpostSupervisor) Config added in v1.3.0

Config mocks base method.

func (*MockpostSupervisor) EXPECT added in v1.3.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockpostSupervisor) Providers added in v1.3.0

Providers mocks base method.

func (*MockpostSupervisor) Start added in v1.3.0

Start mocks base method.

func (*MockpostSupervisor) Status added in v1.3.0

Status mocks base method.

func (*MockpostSupervisor) Stop added in v1.3.0

func (m *MockpostSupervisor) Stop(deleteFiles bool) error

Stop mocks base method.

type MockpostSupervisorBenchmarkCall added in v1.4.0

type MockpostSupervisorBenchmarkCall struct {
	*gomock.Call
}

MockpostSupervisorBenchmarkCall wrap *gomock.Call

func (*MockpostSupervisorBenchmarkCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpostSupervisorBenchmarkCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpostSupervisorBenchmarkCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockpostSupervisorConfigCall added in v1.4.0

type MockpostSupervisorConfigCall struct {
	*gomock.Call
}

MockpostSupervisorConfigCall wrap *gomock.Call

func (*MockpostSupervisorConfigCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpostSupervisorConfigCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpostSupervisorConfigCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockpostSupervisorMockRecorder added in v1.3.0

type MockpostSupervisorMockRecorder struct {
	// contains filtered or unexported fields
}

MockpostSupervisorMockRecorder is the mock recorder for MockpostSupervisor.

func (*MockpostSupervisorMockRecorder) Benchmark added in v1.3.0

Benchmark indicates an expected call of Benchmark.

func (*MockpostSupervisorMockRecorder) Config added in v1.3.0

Config indicates an expected call of Config.

func (*MockpostSupervisorMockRecorder) Providers added in v1.3.0

Providers indicates an expected call of Providers.

func (*MockpostSupervisorMockRecorder) Start added in v1.3.0

func (mr *MockpostSupervisorMockRecorder) Start(cmdCfg, opts, sig any) *MockpostSupervisorStartCall

Start indicates an expected call of Start.

func (*MockpostSupervisorMockRecorder) Status added in v1.3.0

Status indicates an expected call of Status.

func (*MockpostSupervisorMockRecorder) Stop added in v1.3.0

Stop indicates an expected call of Stop.

type MockpostSupervisorProvidersCall added in v1.4.0

type MockpostSupervisorProvidersCall struct {
	*gomock.Call
}

MockpostSupervisorProvidersCall wrap *gomock.Call

func (*MockpostSupervisorProvidersCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpostSupervisorProvidersCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpostSupervisorProvidersCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockpostSupervisorStartCall added in v1.4.0

type MockpostSupervisorStartCall struct {
	*gomock.Call
}

MockpostSupervisorStartCall wrap *gomock.Call

func (*MockpostSupervisorStartCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpostSupervisorStartCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpostSupervisorStartCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockpostSupervisorStatusCall added in v1.4.0

type MockpostSupervisorStatusCall struct {
	*gomock.Call
}

MockpostSupervisorStatusCall wrap *gomock.Call

func (*MockpostSupervisorStatusCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpostSupervisorStatusCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpostSupervisorStatusCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MockpostSupervisorStopCall added in v1.4.0

type MockpostSupervisorStopCall struct {
	*gomock.Call
}

MockpostSupervisorStopCall wrap *gomock.Call

func (*MockpostSupervisorStopCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MockpostSupervisorStopCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockpostSupervisorStopCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type Mocksyncer added in v1.0.0

type Mocksyncer struct {
	// contains filtered or unexported fields
}

Mocksyncer is a mock of syncer interface.

func NewMocksyncer added in v1.0.0

func NewMocksyncer(ctrl *gomock.Controller) *Mocksyncer

NewMocksyncer creates a new mock instance.

func (*Mocksyncer) EXPECT added in v1.0.0

func (m *Mocksyncer) EXPECT() *MocksyncerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*Mocksyncer) IsSynced added in v1.0.0

func (m *Mocksyncer) IsSynced(arg0 context.Context) bool

IsSynced mocks base method.

type MocksyncerIsSyncedCall added in v1.4.0

type MocksyncerIsSyncedCall struct {
	*gomock.Call
}

MocksyncerIsSyncedCall wrap *gomock.Call

func (*MocksyncerIsSyncedCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MocksyncerIsSyncedCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocksyncerIsSyncedCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type MocksyncerMockRecorder added in v1.0.0

type MocksyncerMockRecorder struct {
	// contains filtered or unexported fields
}

MocksyncerMockRecorder is the mock recorder for Mocksyncer.

func (*MocksyncerMockRecorder) IsSynced added in v1.0.0

IsSynced indicates an expected call of IsSynced.

type MocktxValidator added in v1.0.0

type MocktxValidator struct {
	// contains filtered or unexported fields
}

MocktxValidator is a mock of txValidator interface.

func NewMocktxValidator added in v1.0.0

func NewMocktxValidator(ctrl *gomock.Controller) *MocktxValidator

NewMocktxValidator creates a new mock instance.

func (*MocktxValidator) EXPECT added in v1.0.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MocktxValidator) VerifyAndCacheTx added in v1.0.0

func (m *MocktxValidator) VerifyAndCacheTx(arg0 context.Context, arg1 []byte) error

VerifyAndCacheTx mocks base method.

type MocktxValidatorMockRecorder added in v1.0.0

type MocktxValidatorMockRecorder struct {
	// contains filtered or unexported fields
}

MocktxValidatorMockRecorder is the mock recorder for MocktxValidator.

func (*MocktxValidatorMockRecorder) VerifyAndCacheTx added in v1.0.0

func (mr *MocktxValidatorMockRecorder) VerifyAndCacheTx(arg0, arg1 any) *MocktxValidatorVerifyAndCacheTxCall

VerifyAndCacheTx indicates an expected call of VerifyAndCacheTx.

type MocktxValidatorVerifyAndCacheTxCall added in v1.4.0

type MocktxValidatorVerifyAndCacheTxCall struct {
	*gomock.Call
}

MocktxValidatorVerifyAndCacheTxCall wrap *gomock.Call

func (*MocktxValidatorVerifyAndCacheTxCall) Do added in v1.4.0

Do rewrite *gomock.Call.Do

func (*MocktxValidatorVerifyAndCacheTxCall) DoAndReturn added in v1.4.0

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MocktxValidatorVerifyAndCacheTxCall) Return added in v1.4.0

Return rewrite *gomock.Call.Return

type NodeService

type NodeService struct {
	// contains filtered or unexported fields
}

NodeService is a grpc server that provides the NodeService, which exposes node-related data such as node status, software version, errors, etc. It can also be used to start the sync process, or to shut down the node.

func NewNodeService

func NewNodeService(
	peers peerCounter,
	msh meshAPI,
	genTime genesisTimeAPI,
	syncer syncer,
	appVersion string,
	appCommit string,
) *NodeService

NewNodeService creates a new grpc service using config data.

func (NodeService) Build

Build returns the build of the node software.

func (NodeService) Echo

Echo returns the response for an echo api request. It's used for E2E tests.

func (NodeService) ErrorStream

ErrorStream exposes a stream of node errors.

func (NodeService) NodeInfo added in v1.0.0

func (NodeService) RegisterHandlerService added in v1.3.0

func (s NodeService) RegisterHandlerService(mux *runtime.ServeMux) error

func (NodeService) RegisterService

func (s NodeService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (NodeService) Status

Status returns a status object providing information about the connected peers, sync status, current and verified layer.

func (NodeService) StatusStream

StatusStream exposes a stream of node status updates.

func (NodeService) String added in v1.3.0

func (s NodeService) String() string

String returns the name of this service.

func (NodeService) Version

Version returns the version of the node software as a semver string.

type PostInfoService added in v1.4.0

type PostInfoService struct {
	// contains filtered or unexported fields
}

PostInfoService provides information about connected PostServices.

func NewPostInfoService added in v1.4.0

func NewPostInfoService(log *zap.Logger, states postState) *PostInfoService

NewPostInfoService creates a new instance of the post info grpc service.

func (*PostInfoService) PostStates added in v1.4.0

func (*PostInfoService) RegisterHandlerService added in v1.4.0

func (s *PostInfoService) RegisterHandlerService(mux *runtime.ServeMux) error

func (*PostInfoService) RegisterService added in v1.4.0

func (s *PostInfoService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (*PostInfoService) String added in v1.4.0

func (s *PostInfoService) String() string

String returns the name of this service.

type PostService added in v1.3.0

type PostService struct {
	// contains filtered or unexported fields
}

PostService is a grpc server that PoST nodes can connect to in order to register. The bidirectional stream established between the node and the PoST node can be used to send challenges and receive proofs.

func NewPostService added in v1.3.0

func NewPostService(log *zap.Logger) *PostService

NewPostService creates a new instance of the post grpc service.

func (*PostService) AllowConnections added in v1.4.5

func (s *PostService) AllowConnections(allow bool)

AllowConnections sets if the grpc service accepts new incoming connections from post services.

func (*PostService) Client added in v1.3.0

func (s *PostService) Client(nodeId types.NodeID) (activation.PostClient, error)

func (*PostService) Register added in v1.3.0

func (s *PostService) Register(stream pb.PostService_RegisterServer) error

Register is called by the PoST service to connect with the node. It creates a bidirectional stream that is kept open until either side closes it. The other functions on this service are called by services of the node to send requests to the PoST node and receive responses.

func (*PostService) RegisterHandlerService added in v1.3.0

func (s *PostService) RegisterHandlerService(mux *runtime.ServeMux) error

func (*PostService) RegisterService added in v1.3.0

func (s *PostService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (*PostService) String added in v1.3.0

func (s *PostService) String() string

String returns the name of this service.

type Server

type Server struct {

	// BoundAddress contains the address that the server bound to, useful if
	// the server uses a dynamic port. It is set during startup and can be
	// safely accessed after Start has completed (I.E. the returned channel has
	// been waited on)
	BoundAddress string
	GrpcServer   *grpc.Server
	// contains filtered or unexported fields
}

Server is a very basic grpc server.

func New added in v1.0.0

func New(listener string, logger *zap.Logger, config Config, grpcOpts ...grpc.ServerOption) *Server

New creates and returns a new Server listening on the given address. The server is configured with the given logger and config. Additional grpc options can be passed.

func NewTLS added in v1.3.0

func NewTLS(logger *zap.Logger, config Config, svc []ServiceAPI) (*Server, error)

NewTLS creates a new Server listening on the TLSListener address with the given logger and config. Services passed in the svc slice are registered with the server.

func NewWithServices added in v1.4.0

func NewWithServices(
	listener string,
	logger *zap.Logger,
	config Config,
	svc []ServiceAPI,
	grpcOpts ...grpc.ServerOption,
) (*Server, error)

NewWithServices creates a new Server listening on the provided address with the given logger and config. Services passed in the svc slice are registered with the server.

func (*Server) Close

func (s *Server) Close() error

Close stops the server.

func (*Server) Start

func (s *Server) Start() error

Start starts the server.

type Service added in v1.0.0

type Service = string
const (
	Admin                    Service = "admin"
	Debug                    Service = "debug"
	GlobalState              Service = "global"
	Mesh                     Service = "mesh"
	Transaction              Service = "transaction"
	Activation               Service = "activation"
	Smesher                  Service = "smesher"
	Post                     Service = "post"
	PostInfo                 Service = "postInfo"
	Node                     Service = "node"
	ActivationV2Alpha1       Service = "activation_v2alpha1"
	ActivationStreamV2Alpha1 Service = "activation_stream_v2alpha1"
	RewardV2Alpha1           Service = "reward_v2alpha1"
	RewardStreamV2Alpha1     Service = "reward_stream_v2alpha1"
	NetworkV2Alpha1          Service = "network_v2alpha1"
	NodeV2Alpha1             Service = "node_v2alpha1"
)

type ServiceAPI

type ServiceAPI interface {
	RegisterService(*grpc.Server)
	RegisterHandlerService(*runtime.ServeMux) error
	String() string
}

ServiceAPI allows individual grpc services to register the grpc server.

type SmesherService

type SmesherService struct {
	// contains filtered or unexported fields
}

SmesherService exposes endpoints to manage smeshing.

func NewSmesherService

func NewSmesherService(
	smeshing activation.SmeshingProvider,
	postSupervisor postSupervisor,
	grpcPostService grpcPostService,
	streamInterval time.Duration,
	postOpts activation.PostSetupOpts,
	sig *signing.EdSigner,
) *SmesherService

NewSmesherService creates a new grpc service using config data.

func (SmesherService) Coinbase

Coinbase returns the current coinbase setting of this node.

func (SmesherService) EstimatedRewards added in v0.1.16

EstimatedRewards returns estimated smeshing rewards over the next epoch.

func (SmesherService) IsSmeshing

IsSmeshing reports whether the node is smeshing.

func (SmesherService) MinGas

MinGas returns the current mingas setting of this node.

func (SmesherService) PostConfig added in v1.0.0

PostConfig returns the Post protocol config.

func (SmesherService) PostSetupProviders added in v1.0.0

PostSetupComputeProviders returns a list of available Post setup compute providers.

func (SmesherService) PostSetupStatus added in v1.0.0

func (s SmesherService) PostSetupStatus(ctx context.Context, _ *emptypb.Empty) (*pb.PostSetupStatusResponse, error)

PostSetupStatus returns post data status.

func (SmesherService) PostSetupStatusStream added in v1.0.0

func (s SmesherService) PostSetupStatusStream(
	_ *emptypb.Empty,
	stream pb.SmesherService_PostSetupStatusStreamServer,
) error

PostSetupStatusStream exposes a stream of status updates during post setup.

func (SmesherService) RegisterHandlerService added in v1.3.0

func (s SmesherService) RegisterHandlerService(mux *runtime.ServeMux) error

func (SmesherService) RegisterService

func (s SmesherService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (SmesherService) SetCoinbase

SetCoinbase sets the current coinbase setting of this node.

func (SmesherService) SetMinGas

SetMinGas sets the mingas setting of this node.

func (*SmesherService) SetPostServiceConfig added in v1.4.2

func (s *SmesherService) SetPostServiceConfig(cfg activation.PostSupervisorConfig)

SetPostServiceConfig sets the post supervisor config.

func (SmesherService) SmesherID

SmesherID returns the smesher ID of this node.

func (SmesherService) SmesherIDs added in v1.4.0

func (SmesherService) StartSmeshing

StartSmeshing requests that the node begin smeshing.

func (SmesherService) StopSmeshing

StopSmeshing requests that the node stop smeshing.

func (SmesherService) String added in v1.3.0

func (s SmesherService) String() string

String returns the name of this service.

type TransactionService

type TransactionService struct {
	// contains filtered or unexported fields
}

TransactionService exposes transaction data, and a submit tx endpoint.

func NewTransactionService

func NewTransactionService(
	db *sql.Database,
	publisher pubsub.Publisher,
	msh meshAPI,
	conState conservativeState,
	syncer syncer,
	txHandler txValidator,
) *TransactionService

NewTransactionService creates a new grpc service using config data.

func (TransactionService) ParseTransaction added in v1.0.0

func (TransactionService) RegisterHandlerService added in v1.3.0

func (s TransactionService) RegisterHandlerService(mux *runtime.ServeMux) error

func (TransactionService) RegisterService

func (s TransactionService) RegisterService(server *grpc.Server)

RegisterService registers this service with a grpc server instance.

func (TransactionService) StreamResults added in v1.0.0

StreamResults allows to query historical results and subscribe to live data using the same filter.

func (TransactionService) String added in v1.3.0

func (s TransactionService) String() string

String returns the name of this service.

func (TransactionService) SubmitTransaction

SubmitTransaction allows a new tx to be submitted.

func (TransactionService) TransactionsState

TransactionsState returns current tx data for one or more txs.

func (TransactionService) TransactionsStateStream

TransactionsStateStream exposes a stream of tx data.

Directories

Path Synopsis
Package v2alpha1 is a generated GoMock package.
Package v2alpha1 is a generated GoMock package.

Jump to

Keyboard shortcuts

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