mirror of
https://github.com/luxfi/vm.git
synced 2026-10-30 15:13:40 +00:00
25 lines
580 B
Go
25 lines
580 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package vm
|
|
|
|
import "github.com/luxfi/ids"
|
|
|
|
// Fx is a feature extension for VMs
|
|
type Fx struct {
|
|
ID ids.ID
|
|
Fx any
|
|
}
|
|
|
|
// FxLifecycle defines the lifecycle hooks for feature extensions
|
|
type FxLifecycle interface {
|
|
// Initialize initializes the Fx with the parent VM
|
|
Initialize(vm any) error
|
|
|
|
// Bootstrapping is called when the VM begins bootstrapping
|
|
Bootstrapping() error
|
|
|
|
// Bootstrapped is called when the VM finishes bootstrapping
|
|
Bootstrapped() error
|
|
}
|