Documentation ¶
Overview ¶
Package rpcchainvm is a generated GoMock package.
Package rpcchainvm is a generated GoMock package.
Index ¶
- Variables
- func New(vm block.ChainVM) plugin.Plugin
- func NewFactory(path string, processTracker resource.ProcessTracker) vms.Factory
- func Serve(vm block.ChainVM)
- type MockFactory
- type MockFactoryMockRecorder
- type MockPluginDirectory
- type MockPluginDirectoryMockRecorder
- type VMClient
- func (vm *VMClient) AppGossip(nodeID ids.NodeID, msg []byte) error
- func (vm *VMClient) AppRequest(nodeID ids.NodeID, requestID uint32, deadline time.Time, request []byte) error
- func (vm *VMClient) AppRequestFailed(nodeID ids.NodeID, requestID uint32) error
- func (vm *VMClient) AppResponse(nodeID ids.NodeID, requestID uint32, response []byte) error
- func (vm *VMClient) BatchedParseBlock(blksBytes [][]byte) ([]snowman.Block, error)
- func (vm *VMClient) Connected(nodeID ids.NodeID, nodeVersion *version.Application) error
- func (vm *VMClient) CreateHandlers() (map[string]*common.HTTPHandler, error)
- func (vm *VMClient) CreateStaticHandlers() (map[string]*common.HTTPHandler, error)
- func (vm *VMClient) Disconnected(nodeID ids.NodeID) error
- func (vm *VMClient) Gather() ([]*dto.MetricFamily, error)
- func (vm *VMClient) GetAncestors(blkID ids.ID, maxBlocksNum int, maxBlocksSize int, ...) ([][]byte, error)
- func (vm *VMClient) GetBlockIDAtHeight(height uint64) (ids.ID, error)
- func (vm *VMClient) GetLastStateSummary() (block.StateSummary, error)
- func (vm *VMClient) GetOngoingSyncStateSummary() (block.StateSummary, error)
- func (vm *VMClient) GetStateSummary(summaryHeight uint64) (block.StateSummary, error)
- func (vm *VMClient) HealthCheck() (interface{}, error)
- func (vm *VMClient) Initialize(ctx *snow.Context, dbManager manager.Manager, genesisBytes []byte, ...) error
- func (vm *VMClient) ParseStateSummary(summaryBytes []byte) (block.StateSummary, error)
- func (vm *VMClient) SetPreference(id ids.ID) error
- func (vm *VMClient) SetProcess(ctx *snow.Context, proc *plugin.Client, processTracker resource.ProcessTracker)
- func (vm *VMClient) SetState(state snow.State) error
- func (vm *VMClient) Shutdown() error
- func (vm *VMClient) StateSyncEnabled() (bool, error)
- func (vm *VMClient) VerifyHeightIndex() error
- func (vm *VMClient) Version() (string, error)
- type VMServer
- func (vm *VMServer) AppGossip(_ context.Context, req *vmpb.AppGossipMsg) (*emptypb.Empty, error)
- func (vm *VMServer) AppRequest(_ context.Context, req *vmpb.AppRequestMsg) (*emptypb.Empty, error)
- func (vm *VMServer) AppRequestFailed(_ context.Context, req *vmpb.AppRequestFailedMsg) (*emptypb.Empty, error)
- func (vm *VMServer) AppResponse(_ context.Context, req *vmpb.AppResponseMsg) (*emptypb.Empty, error)
- func (vm *VMServer) BatchedParseBlock(ctx context.Context, req *vmpb.BatchedParseBlockRequest) (*vmpb.BatchedParseBlockResponse, error)
- func (vm *VMServer) BlockAccept(_ context.Context, req *vmpb.BlockAcceptRequest) (*emptypb.Empty, error)
- func (vm *VMServer) BlockReject(_ context.Context, req *vmpb.BlockRejectRequest) (*emptypb.Empty, error)
- func (vm *VMServer) BlockVerify(_ context.Context, req *vmpb.BlockVerifyRequest) (*vmpb.BlockVerifyResponse, error)
- func (vm *VMServer) BuildBlock(context.Context, *emptypb.Empty) (*vmpb.BuildBlockResponse, error)
- func (vm *VMServer) Connected(_ context.Context, req *vmpb.ConnectedRequest) (*emptypb.Empty, error)
- func (vm *VMServer) CreateHandlers(context.Context, *emptypb.Empty) (*vmpb.CreateHandlersResponse, error)
- func (vm *VMServer) CreateStaticHandlers(context.Context, *emptypb.Empty) (*vmpb.CreateStaticHandlersResponse, error)
- func (vm *VMServer) Disconnected(_ context.Context, req *vmpb.DisconnectedRequest) (*emptypb.Empty, error)
- func (vm *VMServer) Gather(context.Context, *emptypb.Empty) (*vmpb.GatherResponse, error)
- func (vm *VMServer) GetAncestors(_ context.Context, req *vmpb.GetAncestorsRequest) (*vmpb.GetAncestorsResponse, error)
- func (vm *VMServer) GetBlock(_ context.Context, req *vmpb.GetBlockRequest) (*vmpb.GetBlockResponse, error)
- func (vm *VMServer) GetBlockIDAtHeight(ctx context.Context, req *vmpb.GetBlockIDAtHeightRequest) (*vmpb.GetBlockIDAtHeightResponse, error)
- func (vm *VMServer) GetLastStateSummary(ctx context.Context, empty *emptypb.Empty) (*vmpb.GetLastStateSummaryResponse, error)
- func (vm *VMServer) GetOngoingSyncStateSummary(context.Context, *emptypb.Empty) (*vmpb.GetOngoingSyncStateSummaryResponse, error)
- func (vm *VMServer) GetStateSummary(ctx context.Context, req *vmpb.GetStateSummaryRequest) (*vmpb.GetStateSummaryResponse, error)
- func (vm *VMServer) Health(ctx context.Context, req *emptypb.Empty) (*vmpb.HealthResponse, error)
- func (vm *VMServer) Initialize(_ context.Context, req *vmpb.InitializeRequest) (*vmpb.InitializeResponse, error)
- func (vm *VMServer) ParseBlock(_ context.Context, req *vmpb.ParseBlockRequest) (*vmpb.ParseBlockResponse, error)
- func (vm *VMServer) ParseStateSummary(ctx context.Context, req *vmpb.ParseStateSummaryRequest) (*vmpb.ParseStateSummaryResponse, error)
- func (vm *VMServer) SetPreference(_ context.Context, req *vmpb.SetPreferenceRequest) (*emptypb.Empty, error)
- func (vm *VMServer) SetState(_ context.Context, stateReq *vmpb.SetStateRequest) (*vmpb.SetStateResponse, error)
- func (vm *VMServer) Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (vm *VMServer) StateSummaryAccept(_ context.Context, req *vmpb.StateSummaryAcceptRequest) (*vmpb.StateSummaryAcceptResponse, error)
- func (vm *VMServer) StateSyncEnabled(context.Context, *emptypb.Empty) (*vmpb.StateSyncEnabledResponse, error)
- func (vm *VMServer) VerifyHeightIndex(context.Context, *emptypb.Empty) (*vmpb.VerifyHeightIndexResponse, error)
- func (vm *VMServer) Version(context.Context, *emptypb.Empty) (*vmpb.VersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( // Handshake is a common handshake that is shared by plugin and host. Handshake = plugin.HandshakeConfig{ ProtocolVersion: protocolVersion, MagicCookieKey: "VM_PLUGIN", MagicCookieValue: "dynamic", } // PluginMap is the map of plugins we can dispense. PluginMap = map[string]plugin.Plugin{ "vm": &vmPlugin{}, } )
Functions ¶
func New ¶
New will be called by the server side of the plugin to pass into the server side PluginMap for dispatching.
func NewFactory ¶
func NewFactory(path string, processTracker resource.ProcessTracker) vms.Factory
Types ¶
type MockFactory ¶
type MockFactory struct {
// contains filtered or unexported fields
}
MockFactory is a mock of Factory interface.
func NewMockFactory ¶
func NewMockFactory(ctrl *gomock.Controller) *MockFactory
NewMockFactory creates a new mock instance.
func (*MockFactory) EXPECT ¶
func (m *MockFactory) EXPECT() *MockFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFactoryMockRecorder ¶
type MockFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockFactoryMockRecorder is the mock recorder for MockFactory.
func (*MockFactoryMockRecorder) New ¶
func (mr *MockFactoryMockRecorder) New(arg0 interface{}) *gomock.Call
New indicates an expected call of New.
type MockPluginDirectory ¶
type MockPluginDirectory struct {
// contains filtered or unexported fields
}
MockPluginDirectory is a mock of PluginDirectory interface.
func NewMockPluginDirectory ¶
func NewMockPluginDirectory(ctrl *gomock.Controller) *MockPluginDirectory
NewMockPluginDirectory creates a new mock instance.
func (*MockPluginDirectory) EXPECT ¶
func (m *MockPluginDirectory) EXPECT() *MockPluginDirectoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPluginDirectoryMockRecorder ¶
type MockPluginDirectoryMockRecorder struct {
// contains filtered or unexported fields
}
MockPluginDirectoryMockRecorder is the mock recorder for MockPluginDirectory.
func (*MockPluginDirectoryMockRecorder) GetVMs ¶
func (mr *MockPluginDirectoryMockRecorder) GetVMs(manager interface{}) *gomock.Call
GetVMs indicates an expected call of GetVMs.
type VMClient ¶
VMClient is an implementation of a VM that talks over RPC.
func (*VMClient) AppRequest ¶
func (*VMClient) AppRequestFailed ¶
func (*VMClient) AppResponse ¶
func (*VMClient) BatchedParseBlock ¶
func (*VMClient) CreateHandlers ¶
func (vm *VMClient) CreateHandlers() (map[string]*common.HTTPHandler, error)
func (*VMClient) CreateStaticHandlers ¶
func (vm *VMClient) CreateStaticHandlers() (map[string]*common.HTTPHandler, error)
func (*VMClient) GetAncestors ¶
func (*VMClient) GetBlockIDAtHeight ¶
func (*VMClient) GetLastStateSummary ¶
func (vm *VMClient) GetLastStateSummary() (block.StateSummary, error)
func (*VMClient) GetOngoingSyncStateSummary ¶
func (vm *VMClient) GetOngoingSyncStateSummary() (block.StateSummary, error)
func (*VMClient) GetStateSummary ¶
func (vm *VMClient) GetStateSummary(summaryHeight uint64) (block.StateSummary, error)
func (*VMClient) HealthCheck ¶
func (*VMClient) Initialize ¶
func (*VMClient) ParseStateSummary ¶
func (vm *VMClient) ParseStateSummary(summaryBytes []byte) (block.StateSummary, error)
func (*VMClient) SetProcess ¶
func (vm *VMClient) SetProcess(ctx *snow.Context, proc *plugin.Client, processTracker resource.ProcessTracker)
SetProcess gives ownership of the server process to the client.
func (*VMClient) StateSyncEnabled ¶
func (*VMClient) VerifyHeightIndex ¶
type VMServer ¶
type VMServer struct { vmpb.UnsafeVMServer // contains filtered or unexported fields }
VMServer is a VM that is managed over RPC.
func (*VMServer) AppRequest ¶
func (*VMServer) AppRequestFailed ¶
func (*VMServer) AppResponse ¶
func (*VMServer) BatchedParseBlock ¶
func (vm *VMServer) BatchedParseBlock( ctx context.Context, req *vmpb.BatchedParseBlockRequest, ) (*vmpb.BatchedParseBlockResponse, error)
func (*VMServer) BlockAccept ¶
func (*VMServer) BlockReject ¶
func (*VMServer) BlockVerify ¶
func (vm *VMServer) BlockVerify(_ context.Context, req *vmpb.BlockVerifyRequest) (*vmpb.BlockVerifyResponse, error)
func (*VMServer) BuildBlock ¶
func (*VMServer) CreateHandlers ¶
func (*VMServer) CreateStaticHandlers ¶
func (*VMServer) Disconnected ¶
func (*VMServer) GetAncestors ¶
func (vm *VMServer) GetAncestors(_ context.Context, req *vmpb.GetAncestorsRequest) (*vmpb.GetAncestorsResponse, error)
func (*VMServer) GetBlock ¶
func (vm *VMServer) GetBlock(_ context.Context, req *vmpb.GetBlockRequest) (*vmpb.GetBlockResponse, error)
func (*VMServer) GetBlockIDAtHeight ¶
func (vm *VMServer) GetBlockIDAtHeight(ctx context.Context, req *vmpb.GetBlockIDAtHeightRequest) (*vmpb.GetBlockIDAtHeightResponse, error)
func (*VMServer) GetLastStateSummary ¶
func (*VMServer) GetOngoingSyncStateSummary ¶
func (*VMServer) GetStateSummary ¶
func (vm *VMServer) GetStateSummary( ctx context.Context, req *vmpb.GetStateSummaryRequest, ) (*vmpb.GetStateSummaryResponse, error)
func (*VMServer) Initialize ¶
func (vm *VMServer) Initialize(_ context.Context, req *vmpb.InitializeRequest) (*vmpb.InitializeResponse, error)
func (*VMServer) ParseBlock ¶
func (vm *VMServer) ParseBlock(_ context.Context, req *vmpb.ParseBlockRequest) (*vmpb.ParseBlockResponse, error)
func (*VMServer) ParseStateSummary ¶
func (vm *VMServer) ParseStateSummary( ctx context.Context, req *vmpb.ParseStateSummaryRequest, ) (*vmpb.ParseStateSummaryResponse, error)
func (*VMServer) SetPreference ¶
func (*VMServer) SetState ¶
func (vm *VMServer) SetState(_ context.Context, stateReq *vmpb.SetStateRequest) (*vmpb.SetStateResponse, error)
func (*VMServer) StateSummaryAccept ¶
func (vm *VMServer) StateSummaryAccept( _ context.Context, req *vmpb.StateSummaryAcceptRequest, ) (*vmpb.StateSummaryAcceptResponse, error)