microsandbox-rb 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/sig/microsandbox.rbs CHANGED
@@ -174,6 +174,14 @@ module Microsandbox
174
174
  def config: () -> Hash[String, untyped]
175
175
  def snapshot: (String name) -> SnapshotInfo
176
176
  def snapshot_to: (String path) -> SnapshotInfo
177
+ def ping: () -> PingResult
178
+ def touch: () -> TouchResult
179
+ def modify: (?cpus: Integer?, ?max_cpus: Integer?, ?memory: Integer?, ?max_memory: Integer?,
180
+ ?env: Hash[untyped, untyped]?, ?remove_env: Array[String]?,
181
+ ?labels: Hash[untyped, untyped]?, ?remove_labels: Array[String]?,
182
+ ?workdir: String?, ?secrets: Hash[untyped, untyped]?,
183
+ ?remove_secrets: Array[String]?, ?policy: (Symbol | String)?,
184
+ ?dry_run: bool) -> ModificationPlan
177
185
  end
178
186
 
179
187
  # Deprecated alias for SandboxHandle (was a read-only metadata type pre-v0.5.8).
@@ -190,8 +198,34 @@ module Microsandbox
190
198
  def observed_at: () -> Time
191
199
  end
192
200
 
201
+ class PingResult
202
+ def initialize: (Hash[String, untyped] data) -> void
203
+ def name: () -> String
204
+ def latency: () -> Float
205
+ def latency_ms: () -> Float
206
+ end
207
+
208
+ class TouchResult
209
+ def initialize: (Hash[String, untyped] data) -> void
210
+ def name: () -> String
211
+ def activity_seq: () -> Integer
212
+ end
213
+
214
+ class ModificationPlan
215
+ def initialize: (Hash[String, untyped] data) -> void
216
+ def sandbox: () -> String
217
+ def status: () -> String
218
+ def policy: () -> Symbol
219
+ def applied?: () -> bool
220
+ def changes: () -> Array[Hash[Symbol, untyped]]
221
+ def conflicts: () -> Array[Hash[Symbol, untyped]]
222
+ def warnings: () -> Array[Hash[Symbol, untyped]]
223
+ def resize_status: () -> Array[Hash[Symbol, untyped]]
224
+ end
225
+
193
226
  class Sandbox
194
- def self.create: (String name, ?image: String?, ?cpus: Integer?, ?memory: Integer?,
227
+ def self.create: (String name, ?image: String?, ?cpus: Integer?, ?max_cpus: Integer?,
228
+ ?memory: Integer?, ?max_memory: Integer?,
195
229
  ?env: Hash[untyped, untyped]?, ?workdir: String?, ?shell: String?,
196
230
  ?user: String?, ?hostname: String?, ?labels: Hash[untyped, untyped]?,
197
231
  ?scripts: Hash[untyped, untyped]?, ?entrypoint: Array[String]?,
@@ -238,6 +272,14 @@ module Microsandbox
238
272
  def fs: () -> FS
239
273
  def ssh: () -> SshOps
240
274
  def metrics: () -> Metrics
275
+ def ping: () -> PingResult
276
+ def touch: () -> TouchResult
277
+ def modify: (?cpus: Integer?, ?max_cpus: Integer?, ?memory: Integer?, ?max_memory: Integer?,
278
+ ?env: Hash[untyped, untyped]?, ?remove_env: Array[String]?,
279
+ ?labels: Hash[untyped, untyped]?, ?remove_labels: Array[String]?,
280
+ ?workdir: String?, ?secrets: Hash[untyped, untyped]?,
281
+ ?remove_secrets: Array[String]?, ?policy: (Symbol | String)?,
282
+ ?dry_run: bool) -> ModificationPlan
241
283
  def logs: (?tail: Integer?, ?since_ms: Numeric?, ?until_ms: Numeric?,
242
284
  ?sources: Array[String | Symbol]?) -> Array[LogEntry]
243
285
  def metrics_stream: (?interval: Numeric) -> MetricsStream
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microsandbox-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ya-luotao
@@ -68,6 +68,7 @@ files:
68
68
  - lib/microsandbox/image.rb
69
69
  - lib/microsandbox/log_entry.rb
70
70
  - lib/microsandbox/metrics.rb
71
+ - lib/microsandbox/modification.rb
71
72
  - lib/microsandbox/network.rb
72
73
  - lib/microsandbox/patch.rb
73
74
  - lib/microsandbox/sandbox.rb