Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶ added in v0.1.1
func NewFactory( path string, processTracker resource.ProcessTracker, runtimeTracker runtime.Tracker, metricsGatherer metric.MultiGatherer, ) vms.Factory
NewFactory creates a new factory with default transport configuration (ZAP)
func NewFactoryWithTransport ¶ added in v1.23.2
func NewFactoryWithTransport( path string, processTracker resource.ProcessTracker, runtimeTracker runtime.Tracker, metricsGatherer metric.MultiGatherer, transportConfig TransportConfig, ) vms.Factory
NewFactoryWithTransport creates a new factory with specified transport configuration
Types ¶
type Message ¶ added in v1.16.56
type Message uint32
Message represents a notification message type
const (
// PendingTxs indicates pending transactions notification
PendingTxs Message
)
type NotificationForwarder ¶ added in v1.16.56
type NotificationForwarder struct {
Engine Notifier
Subscribe Subscription
Log log.Logger
// contains filtered or unexported fields
}
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 ¶ added in v1.16.56
func NewNotificationForwarder( engine Notifier, subscribe Subscription, log log.Logger, ) *NotificationForwarder
func (*NotificationForwarder) CheckForEvent ¶ added in v1.16.56
func (nf *NotificationForwarder) CheckForEvent()
CheckForEvent cancels any outstanding WaitForEvent calls and schedules a new WaitForEvent call.
func (*NotificationForwarder) Close ¶ added in v1.16.56
func (nf *NotificationForwarder) Close()
Close cancels any outstanding WaitForEvent calls and waits for them to return. After Close returns, no future WaitForEvent calls will be made by the notification forwarder.
type Subscription ¶ added in v1.16.56
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.
type Transport ¶ added in v1.23.2
type Transport string
Transport specifies the RPC transport protocol for VM communication
func ValidTransports ¶ added in v1.23.2
func ValidTransports() []Transport
ValidTransports returns all valid transport values
type TransportConfig ¶ added in v1.23.2
type TransportConfig struct {
// Transport specifies which transport(s) to use
Transport Transport
// Timeout for transport operations
Timeout time.Duration
}
TransportConfig contains transport configuration
func DefaultTransportConfig ¶ added in v1.23.2
func DefaultTransportConfig() TransportConfig
DefaultTransportConfig returns the default transport configuration (ZAP)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package commonmock is a generated GoMock package.
|
Package commonmock is a generated GoMock package. |
|
Package sender provides p2p.Sender implementations over ZAP and gRPC transports.
|
Package sender provides p2p.Sender implementations over ZAP and gRPC transports. |
|
Package zap provides ZAP transport implementation for VM RPC.
|
Package zap provides ZAP transport implementation for VM RPC. |