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
- type BlockClient
- func (b *BlockClient) Accept() error
- func (b *BlockClient) Bytes() []byte
- func (b *BlockClient) Height() uint64
- func (b *BlockClient) ID() ids.ID
- func (b *BlockClient) Parent() ids.ID
- func (b *BlockClient) Reject() error
- func (b *BlockClient) Status() choices.Status
- func (b *BlockClient) Timestamp() time.Time
- func (b *BlockClient) Verify() error
- type Factory
- type MockFactory
- type MockFactoryMockRecorder
- type MockPluginDirectory
- type MockPluginDirectoryMockRecorder
- type VMClient
- func (vm *VMClient) AppGossip(nodeID ids.ShortID, msg []byte) error
- func (vm *VMClient) AppRequest(nodeID ids.ShortID, requestID uint32, deadline time.Time, request []byte) error
- func (vm *VMClient) AppRequestFailed(nodeID ids.ShortID, requestID uint32) error
- func (vm *VMClient) AppResponse(nodeID ids.ShortID, requestID uint32, response []byte) error
- func (vm *VMClient) BatchedParseBlock(blksBytes [][]byte) ([]snowman.Block, error)
- func (vm *VMClient) Connected(nodeID ids.ShortID, 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.ShortID) 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) HealthCheck() (interface{}, error)
- func (vm *VMClient) Initialize(ctx *snow.Context, dbManager manager.Manager, genesisBytes []byte, ...) error
- func (vm *VMClient) SetPreference(id ids.ID) error
- func (vm *VMClient) SetProcess(proc *plugin.Client)
- func (vm *VMClient) SetState(state snow.State) error
- func (vm *VMClient) Shutdown() error
- func (vm *VMClient) VerifyHeightIndex() error
- func (vm *VMClient) Version() (string, error)
- type VMServer
- func (vm *VMServer) AppGossip(_ context.Context, req *vmproto.AppGossipMsg) (*emptypb.Empty, error)
- func (vm *VMServer) AppRequest(_ context.Context, req *vmproto.AppRequestMsg) (*emptypb.Empty, error)
- func (vm *VMServer) AppRequestFailed(_ context.Context, req *vmproto.AppRequestFailedMsg) (*emptypb.Empty, error)
- func (vm *VMServer) AppResponse(_ context.Context, req *vmproto.AppResponseMsg) (*emptypb.Empty, error)
- func (vm *VMServer) BatchedParseBlock(ctx context.Context, req *vmproto.BatchedParseBlockRequest) (*vmproto.BatchedParseBlockResponse, error)
- func (vm *VMServer) BlockAccept(_ context.Context, req *vmproto.BlockAcceptRequest) (*emptypb.Empty, error)
- func (vm *VMServer) BlockReject(_ context.Context, req *vmproto.BlockRejectRequest) (*emptypb.Empty, error)
- func (vm *VMServer) BlockVerify(_ context.Context, req *vmproto.BlockVerifyRequest) (*vmproto.BlockVerifyResponse, error)
- func (vm *VMServer) BuildBlock(context.Context, *emptypb.Empty) (*vmproto.BuildBlockResponse, error)
- func (vm *VMServer) Connected(_ context.Context, req *vmproto.ConnectedRequest) (*emptypb.Empty, error)
- func (vm *VMServer) CreateHandlers(context.Context, *emptypb.Empty) (*vmproto.CreateHandlersResponse, error)
- func (vm *VMServer) CreateStaticHandlers(context.Context, *emptypb.Empty) (*vmproto.CreateStaticHandlersResponse, error)
- func (vm *VMServer) Disconnected(_ context.Context, req *vmproto.DisconnectedRequest) (*emptypb.Empty, error)
- func (vm *VMServer) Gather(context.Context, *emptypb.Empty) (*vmproto.GatherResponse, error)
- func (vm *VMServer) GetAncestors(_ context.Context, req *vmproto.GetAncestorsRequest) (*vmproto.GetAncestorsResponse, error)
- func (vm *VMServer) GetBlock(_ context.Context, req *vmproto.GetBlockRequest) (*vmproto.GetBlockResponse, error)
- func (vm *VMServer) GetBlockIDAtHeight(ctx context.Context, req *vmproto.GetBlockIDAtHeightRequest) (*vmproto.GetBlockIDAtHeightResponse, error)
- func (vm *VMServer) Health(context.Context, *emptypb.Empty) (*vmproto.HealthResponse, error)
- func (vm *VMServer) Initialize(_ context.Context, req *vmproto.InitializeRequest) (*vmproto.InitializeResponse, error)
- func (vm *VMServer) ParseBlock(_ context.Context, req *vmproto.ParseBlockRequest) (*vmproto.ParseBlockResponse, error)
- func (vm *VMServer) SetPreference(_ context.Context, req *vmproto.SetPreferenceRequest) (*emptypb.Empty, error)
- func (vm *VMServer) SetState(_ context.Context, stateReq *vmproto.SetStateRequest) (*emptypb.Empty, error)
- func (vm *VMServer) Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
- func (vm *VMServer) VerifyHeightIndex(context.Context, *emptypb.Empty) (*vmproto.VerifyHeightIndexResponse, error)
- func (vm *VMServer) Version(context.Context, *emptypb.Empty) (*vmproto.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: 11, MagicCookieKey: "VM_PLUGIN", MagicCookieValue: "dynamic", } // PluginMap is the map of plugins we can dispense. PluginMap = map[string]plugin.Plugin{ "vm": &vmPlugin{}, } )
Functions ¶
Types ¶
type BlockClient ¶
type BlockClient struct {
// contains filtered or unexported fields
}
BlockClient is an implementation of Block that talks over RPC.
func (*BlockClient) Accept ¶
func (b *BlockClient) Accept() error
func (*BlockClient) Bytes ¶
func (b *BlockClient) Bytes() []byte
func (*BlockClient) Height ¶ added in v1.6.11
func (b *BlockClient) Height() uint64
func (*BlockClient) ID ¶
func (b *BlockClient) ID() ids.ID
func (*BlockClient) Parent ¶
func (b *BlockClient) Parent() ids.ID
func (*BlockClient) Reject ¶
func (b *BlockClient) Reject() error
func (*BlockClient) Status ¶
func (b *BlockClient) Status() choices.Status
func (*BlockClient) Timestamp ¶ added in v1.6.11
func (b *BlockClient) Timestamp() time.Time
func (*BlockClient) Verify ¶
func (b *BlockClient) Verify() error
type Factory ¶
type Factory interface { // New returns an instance of a virtual machine. New(*snow.Context) (interface{}, error) }
func NewFactory ¶ added in v1.6.11
type MockFactory ¶ added in v1.6.11
type MockFactory struct {
// contains filtered or unexported fields
}
MockFactory is a mock of Factory interface.
func NewMockFactory ¶ added in v1.6.11
func NewMockFactory(ctrl *gomock.Controller) *MockFactory
NewMockFactory creates a new mock instance.
func (*MockFactory) EXPECT ¶ added in v1.6.11
func (m *MockFactory) EXPECT() *MockFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockFactoryMockRecorder ¶ added in v1.6.11
type MockFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockFactoryMockRecorder is the mock recorder for MockFactory.
func (*MockFactoryMockRecorder) New ¶ added in v1.6.11
func (mr *MockFactoryMockRecorder) New(arg0 interface{}) *gomock.Call
New indicates an expected call of New.
type MockPluginDirectory ¶ added in v1.6.11
type MockPluginDirectory struct {
// contains filtered or unexported fields
}
MockPluginDirectory is a mock of PluginDirectory interface.
func NewMockPluginDirectory ¶ added in v1.6.11
func NewMockPluginDirectory(ctrl *gomock.Controller) *MockPluginDirectory
NewMockPluginDirectory creates a new mock instance.
func (*MockPluginDirectory) EXPECT ¶ added in v1.6.11
func (m *MockPluginDirectory) EXPECT() *MockPluginDirectoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPluginDirectoryMockRecorder ¶ added in v1.6.11
type MockPluginDirectoryMockRecorder struct {
// contains filtered or unexported fields
}
MockPluginDirectoryMockRecorder is the mock recorder for MockPluginDirectory.
func (*MockPluginDirectoryMockRecorder) GetVMs ¶ added in v1.6.11
func (mr *MockPluginDirectoryMockRecorder) GetVMs(manager interface{}) *gomock.Call
GetVMs indicates an expected call of GetVMs.
type VMClient ¶
VMClient is an implementation of VM that talks over RPC.
func (*VMClient) AppRequest ¶ added in v1.6.11
func (*VMClient) AppRequestFailed ¶ added in v1.6.11
func (*VMClient) AppResponse ¶ added in v1.6.11
func (*VMClient) BatchedParseBlock ¶ added in v1.6.11
func (*VMClient) CreateHandlers ¶
func (vm *VMClient) CreateHandlers() (map[string]*common.HTTPHandler, error)
func (*VMClient) CreateStaticHandlers ¶ added in v1.6.11
func (vm *VMClient) CreateStaticHandlers() (map[string]*common.HTTPHandler, error)
func (*VMClient) Disconnected ¶ added in v1.6.11
func (*VMClient) Gather ¶ added in v1.6.11
func (vm *VMClient) Gather() ([]*dto.MetricFamily, error)
func (*VMClient) GetAncestors ¶ added in v1.6.11
func (*VMClient) GetBlockIDAtHeight ¶ added in v1.6.11
func (*VMClient) HealthCheck ¶ added in v1.6.11
func (*VMClient) Initialize ¶
func (*VMClient) SetProcess ¶
func (vm *VMClient) SetProcess(proc *plugin.Client)
SetProcess gives ownership of the server process to the client.
func (*VMClient) VerifyHeightIndex ¶ added in v1.6.11
type VMServer ¶
type VMServer struct { vmproto.UnimplementedVMServer // contains filtered or unexported fields }
VMServer is a VM that is managed over RPC.
func (*VMServer) AppRequest ¶ added in v1.6.11
func (*VMServer) AppRequestFailed ¶ added in v1.6.11
func (*VMServer) AppResponse ¶ added in v1.6.11
func (*VMServer) BatchedParseBlock ¶ added in v1.6.11
func (vm *VMServer) BatchedParseBlock( ctx context.Context, req *vmproto.BatchedParseBlockRequest, ) (*vmproto.BatchedParseBlockResponse, error)
func (*VMServer) BlockAccept ¶
func (*VMServer) BlockReject ¶
func (*VMServer) BlockVerify ¶
func (vm *VMServer) BlockVerify(_ context.Context, req *vmproto.BlockVerifyRequest) (*vmproto.BlockVerifyResponse, error)
func (*VMServer) BuildBlock ¶
func (*VMServer) CreateHandlers ¶
func (*VMServer) CreateStaticHandlers ¶ added in v1.6.11
func (*VMServer) Disconnected ¶ added in v1.6.11
func (*VMServer) GetAncestors ¶ added in v1.6.11
func (vm *VMServer) GetAncestors(_ context.Context, req *vmproto.GetAncestorsRequest) (*vmproto.GetAncestorsResponse, error)
func (*VMServer) GetBlock ¶
func (vm *VMServer) GetBlock(_ context.Context, req *vmproto.GetBlockRequest) (*vmproto.GetBlockResponse, error)
func (*VMServer) GetBlockIDAtHeight ¶ added in v1.6.11
func (vm *VMServer) GetBlockIDAtHeight(ctx context.Context, req *vmproto.GetBlockIDAtHeightRequest) (*vmproto.GetBlockIDAtHeightResponse, error)
func (*VMServer) Initialize ¶
func (vm *VMServer) Initialize(_ context.Context, req *vmproto.InitializeRequest) (*vmproto.InitializeResponse, error)
func (*VMServer) ParseBlock ¶
func (vm *VMServer) ParseBlock(_ context.Context, req *vmproto.ParseBlockRequest) (*vmproto.ParseBlockResponse, error)