Module: Bsdkrun
- Defined in:
- lib/bsdkrun.rb,
lib/bsdkrun/args.rb,
lib/bsdkrun/types.rb,
lib/bsdkrun/binary.rb,
lib/bsdkrun/errors.rb,
lib/bsdkrun/images.rb,
lib/bsdkrun/system.rb,
lib/bsdkrun/process.rb,
lib/bsdkrun/sandbox.rb,
lib/bsdkrun/version.rb,
lib/bsdkrun/volumes.rb,
lib/bsdkrun/networks.rb
Overview
bsdkrun — a Ruby SDK for bsdkrun, a
Firecracker-style microVM launcher for BSD and Linux guests. A thin wrapper
around the bsdkrun CLI: it builds argv, shells out, and parses JSON output.
Defined Under Namespace
Modules: Args, Binary, Images, Networks, Process, System, Volumes Classes: BinaryNotFound, CommandFailed, Error, ImageInfo, NetworkInfo, Result, Sandbox, SandboxInfo, SandboxNotFound, VolumeInfo
Constant Summary collapse
- VERSION =
The bsdkrun Ruby SDK version.
"0.1.0"
Class Method Summary collapse
-
.binary_path ⇒ String
The resolved
bsdkrunbinary path. -
.binary_path=(path) ⇒ void
Force the SDK to use a specific
bsdkrunbinary, bypassing discovery. -
.create(opts = {}, **kwargs) ⇒ Sandbox
Convenience alias for Sandbox.create.
-
.get(id) ⇒ Sandbox
Convenience alias for Sandbox.get.
-
.images ⇒ Module
The Images namespace.
-
.list(all: false) ⇒ Array<SandboxInfo>
Convenience alias for Sandbox.list.
-
.networks ⇒ Module
The Networks namespace.
-
.reset_binary! ⇒ void
Reset cached binary discovery state (mainly for tests).
-
.system ⇒ Module
The System namespace.
-
.volumes ⇒ Module
The Volumes namespace.
Class Method Details
.binary_path ⇒ String
Returns the resolved bsdkrun binary path.
36 37 38 |
# File 'lib/bsdkrun.rb', line 36 def binary_path Binary.resolve end |
.binary_path=(path) ⇒ void
This method returns an undefined value.
Force the SDK to use a specific bsdkrun binary, bypassing discovery.
30 31 32 |
# File 'lib/bsdkrun.rb', line 30 def binary_path=(path) Binary.override = path end |
.create(opts = {}, **kwargs) ⇒ Sandbox
Convenience alias for Bsdkrun::Sandbox.create.
48 49 50 |
# File 'lib/bsdkrun.rb', line 48 def create(opts = {}, **kwargs) Sandbox.create(opts, **kwargs) end |
.get(id) ⇒ Sandbox
Convenience alias for Bsdkrun::Sandbox.get.
54 55 56 |
# File 'lib/bsdkrun.rb', line 54 def get(id) Sandbox.get(id) end |
.images ⇒ Module
The Images namespace.
66 67 68 |
# File 'lib/bsdkrun.rb', line 66 def images Images end |
.list(all: false) ⇒ Array<SandboxInfo>
Convenience alias for Bsdkrun::Sandbox.list.
60 61 62 |
# File 'lib/bsdkrun.rb', line 60 def list(all: false) Sandbox.list(all: all) end |
.networks ⇒ Module
The Networks namespace.
78 79 80 |
# File 'lib/bsdkrun.rb', line 78 def networks Networks end |
.reset_binary! ⇒ void
This method returns an undefined value.
Reset cached binary discovery state (mainly for tests).
42 43 44 |
# File 'lib/bsdkrun.rb', line 42 def reset_binary! Binary.reset! end |