volcano-sdk 0.9.4 → 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.
- checksums.yaml +4 -4
- data/README.md +69 -0
- data/lib/volcano/client.rb +2 -1
- data/lib/volcano/durable.rb +136 -0
- data/lib/volcano/durable_models.rb +143 -0
- data/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb +1239 -0
- data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/functions_api.rb +18 -6
- data/lib/volcano/generated/lib/volcano-generated/api/o_auth_authentication_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/projects_api.rb +76 -2
- data/lib/volcano/generated/lib/volcano-generated/models/create_database_request.rb +6 -8
- data/lib/volcano/generated/lib/volcano-generated/models/create_variable_request.rb +11 -1
- data/lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb +358 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_execution_error.rb +157 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_execution_status.rb +45 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_function.rb +479 -0
- data/lib/volcano/generated/lib/volcano-generated/models/durable_function_config.rb +193 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_kind.rb +40 -0
- data/lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb +28 -1
- data/lib/volcano/generated/lib/volcano-generated/models/function_scheduler.rb +11 -1
- data/lib/volcano/generated/lib/volcano-generated/models/list_database_regions200_response_inner.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/metric_usage_data.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_executions.rb +274 -0
- data/lib/volcano/generated/lib/volcano-generated/models/paginated_durable_functions.rb +274 -0
- data/lib/volcano/generated/lib/volcano-generated/models/project_config.rb +23 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_function.rb +47 -2
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_variable.rb +11 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_deployment_resource.rb +14 -4
- data/lib/volcano/generated/lib/volcano-generated/models/project_health_resource.rb +14 -4
- data/lib/volcano/generated/lib/volcano-generated/models/replace_shared_variables_request.rb +237 -0
- data/lib/volcano/generated/lib/volcano-generated/models/update_variable_request.rb +11 -1
- data/lib/volcano/generated/lib/volcano-generated/models/variable.rb +11 -1
- data/lib/volcano/generated/lib/volcano-generated.rb +10 -0
- data/lib/volcano/generated_transport.rb +2 -1
- data/lib/volcano/generated_transport_durable.rb +50 -0
- data/lib/volcano/generated_transport_support.rb +1 -0
- data/lib/volcano/version.rb +1 -1
- data/lib/volcano.rb +2 -0
- metadata +14 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Volcano Hosting API
|
|
3
|
+
|
|
4
|
+
#Public API for Volcano Hosting clients, SDKs, and CLI tooling (Port 8000). This specification intentionally excludes first-party/internal APIs. See api/openapi-internal.yaml for non-public internal and Builder operations.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 3.0.0
|
|
7
|
+
Contact: support@volcano.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Volcano::Generated
|
|
17
|
+
class ReplaceSharedVariablesRequest < ApiModelBase
|
|
18
|
+
attr_accessor :shared_variables
|
|
19
|
+
|
|
20
|
+
# When present, replace only if the current complete shared list matches this list.
|
|
21
|
+
attr_accessor :expected_shared_variables
|
|
22
|
+
|
|
23
|
+
# SHA-256 of the sorted unique current shared names joined by a newline. Use instead of expected_shared_variables for a compact conditional replacement.
|
|
24
|
+
attr_accessor :expected_shared_variables_digest
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'shared_variables' => :'shared_variables',
|
|
30
|
+
:'expected_shared_variables' => :'expected_shared_variables',
|
|
31
|
+
:'expected_shared_variables_digest' => :'expected_shared_variables_digest'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns attribute mapping this model knows about
|
|
36
|
+
def self.acceptable_attribute_map
|
|
37
|
+
attribute_map
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
acceptable_attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'shared_variables' => :'Array<String>',
|
|
49
|
+
:'expected_shared_variables' => :'Array<String>',
|
|
50
|
+
:'expected_shared_variables_digest' => :'String'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# List of attributes with nullable: true
|
|
55
|
+
def self.openapi_nullable
|
|
56
|
+
Set.new([
|
|
57
|
+
])
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Initializes the object
|
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
|
+
def initialize(attributes = {})
|
|
63
|
+
if (!attributes.is_a?(Hash))
|
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Volcano::Generated::ReplaceSharedVariablesRequest` initialize method"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Volcano::Generated::ReplaceSharedVariablesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'shared_variables')
|
|
77
|
+
if (value = attributes[:'shared_variables']).is_a?(Array)
|
|
78
|
+
self.shared_variables = value
|
|
79
|
+
end
|
|
80
|
+
else
|
|
81
|
+
self.shared_variables = nil
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'expected_shared_variables')
|
|
85
|
+
if (value = attributes[:'expected_shared_variables']).is_a?(Array)
|
|
86
|
+
self.expected_shared_variables = value
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'expected_shared_variables_digest')
|
|
91
|
+
self.expected_shared_variables_digest = attributes[:'expected_shared_variables_digest']
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
if @shared_variables.nil?
|
|
101
|
+
invalid_properties.push('invalid value for "shared_variables", shared_variables cannot be nil.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if !@expected_shared_variables_digest.nil? && @expected_shared_variables_digest.to_s.length > 64
|
|
105
|
+
invalid_properties.push('invalid value for "expected_shared_variables_digest", the character length must be smaller than or equal to 64.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if !@expected_shared_variables_digest.nil? && @expected_shared_variables_digest.to_s.length < 64
|
|
109
|
+
invalid_properties.push('invalid value for "expected_shared_variables_digest", the character length must be greater than or equal to 64.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
pattern = Regexp.new(/^[a-f0-9]{64}$/)
|
|
113
|
+
if !@expected_shared_variables_digest.nil? && @expected_shared_variables_digest !~ pattern
|
|
114
|
+
invalid_properties.push("invalid value for \"expected_shared_variables_digest\", must conform to the pattern #{pattern}.")
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
invalid_properties
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Check to see if the all the properties in the model are valid
|
|
121
|
+
# @return true if the model is valid
|
|
122
|
+
def valid?
|
|
123
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
124
|
+
return false if @shared_variables.nil?
|
|
125
|
+
return false if !@expected_shared_variables_digest.nil? && @expected_shared_variables_digest.to_s.length > 64
|
|
126
|
+
return false if !@expected_shared_variables_digest.nil? && @expected_shared_variables_digest.to_s.length < 64
|
|
127
|
+
return false if !@expected_shared_variables_digest.nil? && @expected_shared_variables_digest !~ Regexp.new(/^[a-f0-9]{64}$/)
|
|
128
|
+
true
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Custom attribute writer method with validation
|
|
132
|
+
# @param [Object] shared_variables Value to be assigned
|
|
133
|
+
def shared_variables=(shared_variables)
|
|
134
|
+
if shared_variables.nil?
|
|
135
|
+
fail ArgumentError, 'shared_variables cannot be nil'
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
@shared_variables = shared_variables
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Custom attribute writer method with validation
|
|
142
|
+
# @param [Object] expected_shared_variables Value to be assigned
|
|
143
|
+
def expected_shared_variables=(expected_shared_variables)
|
|
144
|
+
if expected_shared_variables.nil?
|
|
145
|
+
fail ArgumentError, 'expected_shared_variables cannot be nil'
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
@expected_shared_variables = expected_shared_variables
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Custom attribute writer method with validation
|
|
152
|
+
# @param [Object] expected_shared_variables_digest Value to be assigned
|
|
153
|
+
def expected_shared_variables_digest=(expected_shared_variables_digest)
|
|
154
|
+
if expected_shared_variables_digest.nil?
|
|
155
|
+
fail ArgumentError, 'expected_shared_variables_digest cannot be nil'
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if expected_shared_variables_digest.to_s.length > 64
|
|
159
|
+
fail ArgumentError, 'invalid value for "expected_shared_variables_digest", the character length must be smaller than or equal to 64.'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if expected_shared_variables_digest.to_s.length < 64
|
|
163
|
+
fail ArgumentError, 'invalid value for "expected_shared_variables_digest", the character length must be greater than or equal to 64.'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
pattern = Regexp.new(/^[a-f0-9]{64}$/)
|
|
167
|
+
if expected_shared_variables_digest !~ pattern
|
|
168
|
+
fail ArgumentError, "invalid value for \"expected_shared_variables_digest\", must conform to the pattern #{pattern}."
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
@expected_shared_variables_digest = expected_shared_variables_digest
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Checks equality by comparing each attribute.
|
|
175
|
+
# @param [Object] Object to be compared
|
|
176
|
+
def ==(o)
|
|
177
|
+
return true if self.equal?(o)
|
|
178
|
+
self.class == o.class &&
|
|
179
|
+
shared_variables == o.shared_variables &&
|
|
180
|
+
expected_shared_variables == o.expected_shared_variables &&
|
|
181
|
+
expected_shared_variables_digest == o.expected_shared_variables_digest
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# @see the `==` method
|
|
185
|
+
# @param [Object] Object to be compared
|
|
186
|
+
def eql?(o)
|
|
187
|
+
self == o
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Calculates hash code according to all attributes.
|
|
191
|
+
# @return [Integer] Hash code
|
|
192
|
+
def hash
|
|
193
|
+
[shared_variables, expected_shared_variables, expected_shared_variables_digest].hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Builds the object from hash
|
|
197
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
198
|
+
# @return [Object] Returns the model itself
|
|
199
|
+
def self.build_from_hash(attributes)
|
|
200
|
+
return nil unless attributes.is_a?(Hash)
|
|
201
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
202
|
+
transformed_hash = {}
|
|
203
|
+
openapi_types.each_pair do |key, type|
|
|
204
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
205
|
+
transformed_hash["#{key}"] = nil
|
|
206
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
207
|
+
# check to ensure the input is an array given that the attribute
|
|
208
|
+
# is documented as an array but the input is not
|
|
209
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
210
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
211
|
+
end
|
|
212
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
new(transformed_hash)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Returns the object in the form of hash
|
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
|
221
|
+
def to_hash
|
|
222
|
+
hash = {}
|
|
223
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
224
|
+
value = self.send(attr)
|
|
225
|
+
if value.nil?
|
|
226
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
227
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
hash[param] = _to_hash(value)
|
|
231
|
+
end
|
|
232
|
+
hash
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
@@ -15,11 +15,15 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Volcano::Generated
|
|
17
17
|
class UpdateVariableRequest < ApiModelBase
|
|
18
|
+
# Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable.
|
|
19
|
+
attr_accessor :shared
|
|
20
|
+
|
|
18
21
|
attr_accessor :value
|
|
19
22
|
|
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
24
|
def self.attribute_map
|
|
22
25
|
{
|
|
26
|
+
:'shared' => :'shared',
|
|
23
27
|
:'value' => :'value'
|
|
24
28
|
}
|
|
25
29
|
end
|
|
@@ -37,6 +41,7 @@ module Volcano::Generated
|
|
|
37
41
|
# Attribute type mapping.
|
|
38
42
|
def self.openapi_types
|
|
39
43
|
{
|
|
44
|
+
:'shared' => :'Boolean',
|
|
40
45
|
:'value' => :'String'
|
|
41
46
|
}
|
|
42
47
|
end
|
|
@@ -63,6 +68,10 @@ module Volcano::Generated
|
|
|
63
68
|
h[k.to_sym] = v
|
|
64
69
|
}
|
|
65
70
|
|
|
71
|
+
if attributes.key?(:'shared')
|
|
72
|
+
self.shared = attributes[:'shared']
|
|
73
|
+
end
|
|
74
|
+
|
|
66
75
|
if attributes.key?(:'value')
|
|
67
76
|
self.value = attributes[:'value']
|
|
68
77
|
else
|
|
@@ -105,6 +114,7 @@ module Volcano::Generated
|
|
|
105
114
|
def ==(o)
|
|
106
115
|
return true if self.equal?(o)
|
|
107
116
|
self.class == o.class &&
|
|
117
|
+
shared == o.shared &&
|
|
108
118
|
value == o.value
|
|
109
119
|
end
|
|
110
120
|
|
|
@@ -117,7 +127,7 @@ module Volcano::Generated
|
|
|
117
127
|
# Calculates hash code according to all attributes.
|
|
118
128
|
# @return [Integer] Hash code
|
|
119
129
|
def hash
|
|
120
|
-
[value].hash
|
|
130
|
+
[shared, value].hash
|
|
121
131
|
end
|
|
122
132
|
|
|
123
133
|
# Builds the object from hash
|
|
@@ -15,6 +15,9 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Volcano::Generated
|
|
17
17
|
class Variable < ApiModelBase
|
|
18
|
+
# Include this name in the project's shared function variables. Omission preserves existing membership; new variables default to true for legacy clients. Send false explicitly to create a non-shared variable.
|
|
19
|
+
attr_accessor :shared
|
|
20
|
+
|
|
18
21
|
attr_accessor :id
|
|
19
22
|
|
|
20
23
|
attr_accessor :project_id
|
|
@@ -64,6 +67,7 @@ module Volcano::Generated
|
|
|
64
67
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
68
|
def self.attribute_map
|
|
66
69
|
{
|
|
70
|
+
:'shared' => :'shared',
|
|
67
71
|
:'id' => :'id',
|
|
68
72
|
:'project_id' => :'project_id',
|
|
69
73
|
:'name' => :'name',
|
|
@@ -90,6 +94,7 @@ module Volcano::Generated
|
|
|
90
94
|
# Attribute type mapping.
|
|
91
95
|
def self.openapi_types
|
|
92
96
|
{
|
|
97
|
+
:'shared' => :'Boolean',
|
|
93
98
|
:'id' => :'String',
|
|
94
99
|
:'project_id' => :'String',
|
|
95
100
|
:'name' => :'String',
|
|
@@ -125,6 +130,10 @@ module Volcano::Generated
|
|
|
125
130
|
h[k.to_sym] = v
|
|
126
131
|
}
|
|
127
132
|
|
|
133
|
+
if attributes.key?(:'shared')
|
|
134
|
+
self.shared = attributes[:'shared']
|
|
135
|
+
end
|
|
136
|
+
|
|
128
137
|
if attributes.key?(:'id')
|
|
129
138
|
self.id = attributes[:'id']
|
|
130
139
|
else
|
|
@@ -321,6 +330,7 @@ module Volcano::Generated
|
|
|
321
330
|
def ==(o)
|
|
322
331
|
return true if self.equal?(o)
|
|
323
332
|
self.class == o.class &&
|
|
333
|
+
shared == o.shared &&
|
|
324
334
|
id == o.id &&
|
|
325
335
|
project_id == o.project_id &&
|
|
326
336
|
name == o.name &&
|
|
@@ -342,7 +352,7 @@ module Volcano::Generated
|
|
|
342
352
|
# Calculates hash code according to all attributes.
|
|
343
353
|
# @return [Integer] Hash code
|
|
344
354
|
def hash
|
|
345
|
-
[id, project_id, name, value, status, current_sync_id, provisioning_started_at, deploy_source, created_at, updated_at].hash
|
|
355
|
+
[shared, id, project_id, name, value, status, current_sync_id, provisioning_started_at, deploy_source, created_at, updated_at].hash
|
|
346
356
|
end
|
|
347
357
|
|
|
348
358
|
# Builds the object from hash
|
|
@@ -131,6 +131,11 @@ Volcano::Generated.autoload :DeploymentPhase, 'volcano-generated/models/deployme
|
|
|
131
131
|
Volcano::Generated.autoload :DeploymentProgress, 'volcano-generated/models/deployment_progress'
|
|
132
132
|
Volcano::Generated.autoload :DeploymentReference, 'volcano-generated/models/deployment_reference'
|
|
133
133
|
Volcano::Generated.autoload :DeviceAuthorizationResponse, 'volcano-generated/models/device_authorization_response'
|
|
134
|
+
Volcano::Generated.autoload :DurableExecution, 'volcano-generated/models/durable_execution'
|
|
135
|
+
Volcano::Generated.autoload :DurableExecutionError, 'volcano-generated/models/durable_execution_error'
|
|
136
|
+
Volcano::Generated.autoload :DurableExecutionStatus, 'volcano-generated/models/durable_execution_status'
|
|
137
|
+
Volcano::Generated.autoload :DurableFunction, 'volcano-generated/models/durable_function'
|
|
138
|
+
Volcano::Generated.autoload :DurableFunctionConfig, 'volcano-generated/models/durable_function_config'
|
|
134
139
|
Volcano::Generated.autoload :EmailTemplate, 'volcano-generated/models/email_template'
|
|
135
140
|
Volcano::Generated.autoload :Error, 'volcano-generated/models/error'
|
|
136
141
|
Volcano::Generated.autoload :ExportProjectSourceRequest, 'volcano-generated/models/export_project_source_request'
|
|
@@ -148,6 +153,7 @@ Volcano::Generated.autoload :FunctionDeployment, 'volcano-generated/models/funct
|
|
|
148
153
|
Volcano::Generated.autoload :FunctionHTTPAuthMode, 'volcano-generated/models/function_http_auth_mode'
|
|
149
154
|
Volcano::Generated.autoload :FunctionInvocationMode, 'volcano-generated/models/function_invocation_mode'
|
|
150
155
|
Volcano::Generated.autoload :FunctionInvocationRequest, 'volcano-generated/models/function_invocation_request'
|
|
156
|
+
Volcano::Generated.autoload :FunctionKind, 'volcano-generated/models/function_kind'
|
|
151
157
|
Volcano::Generated.autoload :FunctionRegion, 'volcano-generated/models/function_region'
|
|
152
158
|
Volcano::Generated.autoload :FunctionRuntimeDeployment, 'volcano-generated/models/function_runtime_deployment'
|
|
153
159
|
Volcano::Generated.autoload :FunctionRuntimeOption, 'volcano-generated/models/function_runtime_option'
|
|
@@ -207,6 +213,8 @@ Volcano::Generated.autoload :OAuthConfig, 'volcano-generated/models/o_auth_confi
|
|
|
207
213
|
Volcano::Generated.autoload :OAuthErrorResponse, 'volcano-generated/models/o_auth_error_response'
|
|
208
214
|
Volcano::Generated.autoload :PaginatedAuthUsers, 'volcano-generated/models/paginated_auth_users'
|
|
209
215
|
Volcano::Generated.autoload :PaginatedDatabases, 'volcano-generated/models/paginated_databases'
|
|
216
|
+
Volcano::Generated.autoload :PaginatedDurableExecutions, 'volcano-generated/models/paginated_durable_executions'
|
|
217
|
+
Volcano::Generated.autoload :PaginatedDurableFunctions, 'volcano-generated/models/paginated_durable_functions'
|
|
210
218
|
Volcano::Generated.autoload :PaginatedFrontendDeployments, 'volcano-generated/models/paginated_frontend_deployments'
|
|
211
219
|
Volcano::Generated.autoload :PaginatedFrontends, 'volcano-generated/models/paginated_frontends'
|
|
212
220
|
Volcano::Generated.autoload :PaginatedFunctionDeployments, 'volcano-generated/models/paginated_function_deployments'
|
|
@@ -320,6 +328,7 @@ Volcano::Generated.autoload :RealtimeConfig, 'volcano-generated/models/realtime_
|
|
|
320
328
|
Volcano::Generated.autoload :RealtimePlanLimits, 'volcano-generated/models/realtime_plan_limits'
|
|
321
329
|
Volcano::Generated.autoload :RealtimeStats, 'volcano-generated/models/realtime_stats'
|
|
322
330
|
Volcano::Generated.autoload :RefreshOAuthProviderToken200Response, 'volcano-generated/models/refresh_o_auth_provider_token200_response'
|
|
331
|
+
Volcano::Generated.autoload :ReplaceSharedVariablesRequest, 'volcano-generated/models/replace_shared_variables_request'
|
|
323
332
|
Volcano::Generated.autoload :ResetDatabasePassword200Response, 'volcano-generated/models/reset_database_password200_response'
|
|
324
333
|
Volcano::Generated.autoload :ResolveFunctionResponse, 'volcano-generated/models/resolve_function_response'
|
|
325
334
|
Volcano::Generated.autoload :ResourceReference, 'volcano-generated/models/resource_reference'
|
|
@@ -368,6 +377,7 @@ Volcano::Generated.autoload :DatabaseBackupsApi, 'volcano-generated/api/database
|
|
|
368
377
|
Volcano::Generated.autoload :DatabaseBranchesApi, 'volcano-generated/api/database_branches_api'
|
|
369
378
|
Volcano::Generated.autoload :DatabaseQueriesApi, 'volcano-generated/api/database_queries_api'
|
|
370
379
|
Volcano::Generated.autoload :DatabasesApi, 'volcano-generated/api/databases_api'
|
|
380
|
+
Volcano::Generated.autoload :DurableFunctionsApi, 'volcano-generated/api/durable_functions_api'
|
|
371
381
|
Volcano::Generated.autoload :FrontendsApi, 'volcano-generated/api/frontends_api'
|
|
372
382
|
Volcano::Generated.autoload :FunctionsApi, 'volcano-generated/api/functions_api'
|
|
373
383
|
Volcano::Generated.autoload :GitConnectionsApi, 'volcano-generated/api/git_connections_api'
|
|
@@ -28,6 +28,7 @@ module Volcano
|
|
|
28
28
|
require_relative 'generated_transport_database'
|
|
29
29
|
require_relative 'generated_transport_logs'
|
|
30
30
|
require_relative 'generated_transport_functions'
|
|
31
|
+
require_relative 'generated_transport_durable'
|
|
31
32
|
require_relative 'generated_transport_storage'
|
|
32
33
|
require_relative 'generated_transport_upload_sessions'
|
|
33
34
|
|
|
@@ -38,7 +39,7 @@ module Volcano
|
|
|
38
39
|
include ValueNormalization
|
|
39
40
|
|
|
40
41
|
GeneratedApis = Data.define(
|
|
41
|
-
:authentication, :oauth, :database, :storage, :locks, :functions, :logs
|
|
42
|
+
:authentication, :oauth, :database, :storage, :locks, :functions, :durable, :logs
|
|
42
43
|
)
|
|
43
44
|
|
|
44
45
|
def initialize(api_url:, timeout: 60, api_factory: nil)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Volcano
|
|
4
|
+
# Durable execution operations for the internal generated transport.
|
|
5
|
+
class GeneratedTransport
|
|
6
|
+
def start_durable_execution_from_application(
|
|
7
|
+
authorization:, function_id:, payload:, execution_name: nil
|
|
8
|
+
)
|
|
9
|
+
invoke do
|
|
10
|
+
apis = @api_factory.call(authorization)
|
|
11
|
+
options = { body: payload, x_volcano_execution_name: execution_name }.compact
|
|
12
|
+
result = apis.durable.start_durable_execution_from_application_with_http_info(
|
|
13
|
+
function_id, options
|
|
14
|
+
)
|
|
15
|
+
data, status, headers = result
|
|
16
|
+
response(data, status, headers)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def get_durable_execution(authorization:, project_id:, function_id:, execution_id:)
|
|
21
|
+
invoke do
|
|
22
|
+
apis = @api_factory.call(authorization)
|
|
23
|
+
data, status, headers = apis.durable.get_durable_execution_with_http_info(
|
|
24
|
+
project_id, function_id, execution_id
|
|
25
|
+
)
|
|
26
|
+
response(data, status, headers)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def list_durable_executions(authorization:, project_id:, function_id:, options:)
|
|
31
|
+
invoke do
|
|
32
|
+
apis = @api_factory.call(authorization)
|
|
33
|
+
data, status, headers = apis.durable.list_durable_executions_with_http_info(
|
|
34
|
+
project_id, function_id, options
|
|
35
|
+
)
|
|
36
|
+
response(data, status, headers)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def stop_durable_execution(authorization:, project_id:, function_id:, execution_id:)
|
|
41
|
+
invoke do
|
|
42
|
+
apis = @api_factory.call(authorization)
|
|
43
|
+
data, status, headers = apis.durable.stop_durable_execution_with_http_info(
|
|
44
|
+
project_id, function_id, execution_id
|
|
45
|
+
)
|
|
46
|
+
response(data, status, headers)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -202,6 +202,7 @@ module Volcano
|
|
|
202
202
|
storage: StorageApi.new(api_client),
|
|
203
203
|
locks: Generated::LocksApi.new(api_client),
|
|
204
204
|
functions: Generated::FunctionsApi.new(api_client),
|
|
205
|
+
durable: Generated::DurableFunctionsApi.new(api_client),
|
|
205
206
|
logs: Generated::LogsApi.new(api_client)
|
|
206
207
|
)
|
|
207
208
|
end
|
data/lib/volcano/version.rb
CHANGED
data/lib/volcano.rb
CHANGED
|
@@ -5,6 +5,7 @@ require_relative 'volcano/connection_string'
|
|
|
5
5
|
require_relative 'volcano/models'
|
|
6
6
|
require_relative 'volcano/session'
|
|
7
7
|
require_relative 'volcano/function_response'
|
|
8
|
+
require_relative 'volcano/durable_models'
|
|
8
9
|
require_relative 'volcano/log_responses'
|
|
9
10
|
require_relative 'volcano/storage_models'
|
|
10
11
|
require_relative 'volcano/session_operations'
|
|
@@ -35,6 +36,7 @@ require_relative 'volcano/auth_update_user'
|
|
|
35
36
|
require_relative 'volcano/database'
|
|
36
37
|
require_relative 'volcano/function_resolution'
|
|
37
38
|
require_relative 'volcano/functions'
|
|
39
|
+
require_relative 'volcano/durable'
|
|
38
40
|
require_relative 'volcano/logs'
|
|
39
41
|
require_relative 'volcano/storage'
|
|
40
42
|
require_relative 'volcano/storage_upload_sessions'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: volcano-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kong
|
|
@@ -152,6 +152,8 @@ files:
|
|
|
152
152
|
- lib/volcano/client.rb
|
|
153
153
|
- lib/volcano/connection_string.rb
|
|
154
154
|
- lib/volcano/database.rb
|
|
155
|
+
- lib/volcano/durable.rb
|
|
156
|
+
- lib/volcano/durable_models.rb
|
|
155
157
|
- lib/volcano/errors.rb
|
|
156
158
|
- lib/volcano/function_auth.rb
|
|
157
159
|
- lib/volcano/function_resolution.rb
|
|
@@ -166,6 +168,7 @@ files:
|
|
|
166
168
|
- lib/volcano/generated/lib/volcano-generated/api/database_branches_api.rb
|
|
167
169
|
- lib/volcano/generated/lib/volcano-generated/api/database_queries_api.rb
|
|
168
170
|
- lib/volcano/generated/lib/volcano-generated/api/databases_api.rb
|
|
171
|
+
- lib/volcano/generated/lib/volcano-generated/api/durable_functions_api.rb
|
|
169
172
|
- lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb
|
|
170
173
|
- lib/volcano/generated/lib/volcano-generated/api/functions_api.rb
|
|
171
174
|
- lib/volcano/generated/lib/volcano-generated/api/git_connections_api.rb
|
|
@@ -300,6 +303,11 @@ files:
|
|
|
300
303
|
- lib/volcano/generated/lib/volcano-generated/models/deployment_progress.rb
|
|
301
304
|
- lib/volcano/generated/lib/volcano-generated/models/deployment_reference.rb
|
|
302
305
|
- lib/volcano/generated/lib/volcano-generated/models/device_authorization_response.rb
|
|
306
|
+
- lib/volcano/generated/lib/volcano-generated/models/durable_execution.rb
|
|
307
|
+
- lib/volcano/generated/lib/volcano-generated/models/durable_execution_error.rb
|
|
308
|
+
- lib/volcano/generated/lib/volcano-generated/models/durable_execution_status.rb
|
|
309
|
+
- lib/volcano/generated/lib/volcano-generated/models/durable_function.rb
|
|
310
|
+
- lib/volcano/generated/lib/volcano-generated/models/durable_function_config.rb
|
|
303
311
|
- lib/volcano/generated/lib/volcano-generated/models/email_template.rb
|
|
304
312
|
- lib/volcano/generated/lib/volcano-generated/models/error.rb
|
|
305
313
|
- lib/volcano/generated/lib/volcano-generated/models/export_project_source_request.rb
|
|
@@ -317,6 +325,7 @@ files:
|
|
|
317
325
|
- lib/volcano/generated/lib/volcano-generated/models/function_http_auth_mode.rb
|
|
318
326
|
- lib/volcano/generated/lib/volcano-generated/models/function_invocation_mode.rb
|
|
319
327
|
- lib/volcano/generated/lib/volcano-generated/models/function_invocation_request.rb
|
|
328
|
+
- lib/volcano/generated/lib/volcano-generated/models/function_kind.rb
|
|
320
329
|
- lib/volcano/generated/lib/volcano-generated/models/function_region.rb
|
|
321
330
|
- lib/volcano/generated/lib/volcano-generated/models/function_runtime_deployment.rb
|
|
322
331
|
- lib/volcano/generated/lib/volcano-generated/models/function_runtime_option.rb
|
|
@@ -376,6 +385,8 @@ files:
|
|
|
376
385
|
- lib/volcano/generated/lib/volcano-generated/models/o_auth_error_response.rb
|
|
377
386
|
- lib/volcano/generated/lib/volcano-generated/models/paginated_auth_users.rb
|
|
378
387
|
- lib/volcano/generated/lib/volcano-generated/models/paginated_databases.rb
|
|
388
|
+
- lib/volcano/generated/lib/volcano-generated/models/paginated_durable_executions.rb
|
|
389
|
+
- lib/volcano/generated/lib/volcano-generated/models/paginated_durable_functions.rb
|
|
379
390
|
- lib/volcano/generated/lib/volcano-generated/models/paginated_frontend_deployments.rb
|
|
380
391
|
- lib/volcano/generated/lib/volcano-generated/models/paginated_frontends.rb
|
|
381
392
|
- lib/volcano/generated/lib/volcano-generated/models/paginated_function_deployments.rb
|
|
@@ -489,6 +500,7 @@ files:
|
|
|
489
500
|
- lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb
|
|
490
501
|
- lib/volcano/generated/lib/volcano-generated/models/realtime_stats.rb
|
|
491
502
|
- lib/volcano/generated/lib/volcano-generated/models/refresh_o_auth_provider_token200_response.rb
|
|
503
|
+
- lib/volcano/generated/lib/volcano-generated/models/replace_shared_variables_request.rb
|
|
492
504
|
- lib/volcano/generated/lib/volcano-generated/models/reset_database_password200_response.rb
|
|
493
505
|
- lib/volcano/generated/lib/volcano-generated/models/resolve_function_response.rb
|
|
494
506
|
- lib/volcano/generated/lib/volcano-generated/models/resource_reference.rb
|
|
@@ -533,6 +545,7 @@ files:
|
|
|
533
545
|
- lib/volcano/generated_transport_auth.rb
|
|
534
546
|
- lib/volcano/generated_transport_confirmation.rb
|
|
535
547
|
- lib/volcano/generated_transport_database.rb
|
|
548
|
+
- lib/volcano/generated_transport_durable.rb
|
|
536
549
|
- lib/volcano/generated_transport_email_change.rb
|
|
537
550
|
- lib/volcano/generated_transport_functions.rb
|
|
538
551
|
- lib/volcano/generated_transport_logs.rb
|