Class: Daytona::CreateSnapshotParams

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/common/snapshot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, image:, resources: nil, entrypoint: nil) ⇒ CreateSnapshotParams

Returns a new instance of CreateSnapshotParams.

Parameters:

  • name (String)

    Name of the snapshot

  • image (String, Daytona::Image)

    Image of the snapshot

  • resources (Daytona::Resources, nil) (defaults to: nil)

    Resources of the snapshot

  • entrypoint (Array<String>, nil) (defaults to: nil)

    Entrypoint of the snapshot



23
24
25
26
27
28
# File 'lib/daytona/common/snapshot.rb', line 23

def initialize(name:, image:, resources: nil, entrypoint: nil)
  @name = name
  @image = image
  @resources = resources
  @entrypoint = entrypoint
end

Instance Attribute Details

#entrypointArray<String>? (readonly)

Returns Entrypoint of the snapshot.

Returns:

  • (Array<String>, nil)

    Entrypoint of the snapshot



17
18
19
# File 'lib/daytona/common/snapshot.rb', line 17

def entrypoint
  @entrypoint
end

#imageString, Daytona::Image (readonly)

Returns Image of the snapshot. If a string is provided, it should be available on some registry. If an Image instance is provided, it will be used to create a new image in Daytona.

Returns:

  • (String, Daytona::Image)

    Image of the snapshot. If a string is provided, it should be available on some registry. If an Image instance is provided, it will be used to create a new image in Daytona.



11
12
13
# File 'lib/daytona/common/snapshot.rb', line 11

def image
  @image
end

#nameString (readonly)

Returns Name of the snapshot.

Returns:

  • (String)

    Name of the snapshot



6
7
8
# File 'lib/daytona/common/snapshot.rb', line 6

def name
  @name
end

#resourcesDaytona::Resources? (readonly)

Returns Resources of the snapshot.

Returns:



14
15
16
# File 'lib/daytona/common/snapshot.rb', line 14

def resources
  @resources
end