rpcchainvm
Package rpcchainvm
import "github.com/luxfi/node/vms/rpcchainvm"Functions
NewFactory
func NewFactory(
path string,
processTracker resource.ProcessTracker,
runtimeTracker runtime.Tracker,
metricsGatherer metric.MultiGatherer,
) vms.FactoryNewFactory creates a new factory. VM subprocesses are spawned and communication uses ZAP — the one and only wire protocol for rpcchainvm.
Types
Message
Message represents a notification message type
func (m Message) String() stringNotificationForwarder
NotificationForwarder is a component that listens for notifications from a Subscription, and forwards them to a Notifier. When CheckForEvent is called mid-subscription, it retries the subscription. After Notify is called, it waits for CheckForEvent to be called before subscribing again.
func NewNotificationForwarder(
engine Notifier,
subscribe Subscription,
log log.Logger,
) *NotificationForwarderfunc (nf *NotificationForwarder) CheckForEvent()func (nf *NotificationForwarder) Close()Notifier
Subscription
Subscription is a function that blocks until either the given context is cancelled, or a message is returned. It is used to receive messages from a VM such as Pending transactions, state sync completion, etc. The function returns the message received, or an error if the context is cancelled.