solid_objects 0.2.0 → 0.3.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/CHANGELOG.md +23 -0
- data/README.md +223 -15
- data/benchmark/adoption_latency.rb +5 -0
- data/benchmark/support.rb +35 -0
- data/docs/architecture.md +62 -15
- data/docs/authorization.md +98 -0
- data/docs/benchmarks.md +75 -1
- data/docs/correctness.md +19 -1
- data/docs/database-schema.md +5 -0
- data/docs/development.md +45 -4
- data/docs/fit.md +98 -0
- data/docs/migrating-existing-state.md +140 -0
- data/docs/operations.md +94 -4
- data/docs/roadmap.md +12 -3
- data/docs/security.md +28 -3
- data/docs/state-migrations.md +6 -0
- data/lib/generators/solid_objects/templates/solid_objects.rb +45 -0
- data/lib/solid_objects/activation.rb +33 -4
- data/lib/solid_objects/actor.rb +47 -6
- data/lib/solid_objects/actor_definition.rb +2 -0
- data/lib/solid_objects/actor_snapshot.rb +10 -4
- data/lib/solid_objects/application_write_guard.rb +24 -0
- data/lib/solid_objects/caller_process.rb +28 -0
- data/lib/solid_objects/cli.rb +44 -5
- data/lib/solid_objects/client.rb +98 -5
- data/lib/solid_objects/commit_action_registry.rb +42 -0
- data/lib/solid_objects/configuration.rb +27 -1
- data/lib/solid_objects/database_adapter.rb +28 -1
- data/lib/solid_objects/database_adapters/mysql.rb +46 -0
- data/lib/solid_objects/database_adapters/postgresql.rb +29 -0
- data/lib/solid_objects/database_adapters/sqlite.rb +28 -0
- data/lib/solid_objects/doctor.rb +311 -0
- data/lib/solid_objects/errors.rb +144 -0
- data/lib/solid_objects/executor.rb +64 -4
- data/lib/solid_objects/instance_pruner.rb +97 -0
- data/lib/solid_objects/message_pruner.rb +97 -0
- data/lib/solid_objects/message_reference.rb +9 -0
- data/lib/solid_objects/process_pruner.rb +49 -0
- data/lib/solid_objects/reference.rb +5 -0
- data/lib/solid_objects/state_snapshot.rb +41 -0
- data/lib/solid_objects/sync_deadline.rb +57 -0
- data/lib/solid_objects/sync_diagnostics.rb +133 -0
- data/lib/solid_objects/synchronous_invocation.rb +26 -7
- data/lib/solid_objects/test_helper.rb +78 -0
- data/lib/solid_objects/version.rb +1 -1
- data/lib/solid_objects/worker.rb +1 -1
- data/lib/solid_objects.rb +34 -0
- data/lib/tasks/solid_objects_tasks.rake +10 -0
- data/sig/generated/lib/solid_objects/activation.rbs +3 -0
- data/sig/generated/lib/solid_objects/actor.rbs +26 -0
- data/sig/generated/lib/solid_objects/application_write_guard.rbs +8 -0
- data/sig/generated/lib/solid_objects/caller_process.rbs +11 -0
- data/sig/generated/lib/solid_objects/cli.rbs +11 -2
- data/sig/generated/lib/solid_objects/client.rbs +15 -0
- data/sig/generated/lib/solid_objects/commit_action_registry.rbs +43 -0
- data/sig/generated/lib/solid_objects/configuration.rbs +27 -7
- data/sig/generated/lib/solid_objects/database_adapter.rbs +9 -0
- data/sig/generated/lib/solid_objects/database_adapters/mysql.rbs +8 -0
- data/sig/generated/lib/solid_objects/database_adapters/postgresql.rbs +8 -0
- data/sig/generated/lib/solid_objects/database_adapters/sqlite.rbs +8 -0
- data/sig/generated/lib/solid_objects/doctor.rbs +111 -0
- data/sig/generated/lib/solid_objects/errors.rbs +118 -0
- data/sig/generated/lib/solid_objects/executor.rbs +12 -0
- data/sig/generated/lib/solid_objects/instance_pruner.rbs +36 -0
- data/sig/generated/lib/solid_objects/message_pruner.rbs +42 -0
- data/sig/generated/lib/solid_objects/message_reference.rbs +3 -0
- data/sig/generated/lib/solid_objects/process_pruner.rbs +27 -0
- data/sig/generated/lib/solid_objects/reference.rbs +3 -0
- data/sig/generated/lib/solid_objects/state_snapshot.rbs +30 -0
- data/sig/generated/lib/solid_objects/sync_deadline.rbs +31 -0
- data/sig/generated/lib/solid_objects/sync_diagnostics.rbs +34 -0
- data/sig/generated/lib/solid_objects/synchronous_invocation.rbs +3 -0
- data/sig/generated/lib/solid_objects/test_helper.rbs +25 -0
- data/sig/generated/lib/solid_objects.rbs +12 -0
- metadata +26 -1
|
@@ -11,6 +11,14 @@ module SolidObjects
|
|
|
11
11
|
|
|
12
12
|
# @rbs () -> String
|
|
13
13
|
def current_time_expression: () -> String
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
# @rbs (untyped) { () -> untyped } -> untyped
|
|
18
|
+
def with_transaction_deadline: (untyped) { () -> untyped } -> untyped
|
|
19
|
+
|
|
20
|
+
# @rbs (Exception) -> bool
|
|
21
|
+
def deadline_error?: (Exception) -> bool
|
|
14
22
|
end
|
|
15
23
|
end
|
|
16
24
|
end
|
|
@@ -8,6 +8,14 @@ module SolidObjects
|
|
|
8
8
|
|
|
9
9
|
# @rbs () -> String
|
|
10
10
|
def claim_lock: () -> String
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
# @rbs (untyped) -> void
|
|
15
|
+
def configure_transaction_deadline: (untyped) -> void
|
|
16
|
+
|
|
17
|
+
# @rbs (Exception) -> bool
|
|
18
|
+
def deadline_error?: (Exception) -> bool
|
|
11
19
|
end
|
|
12
20
|
end
|
|
13
21
|
end
|
|
@@ -5,6 +5,14 @@ module SolidObjects
|
|
|
5
5
|
class Sqlite < DatabaseAdapter
|
|
6
6
|
# @rbs () -> String
|
|
7
7
|
def current_time_expression: () -> String
|
|
8
|
+
|
|
9
|
+
private
|
|
10
|
+
|
|
11
|
+
# @rbs (untyped) { () -> untyped } -> untyped
|
|
12
|
+
def with_transaction_deadline: (untyped) { () -> untyped } -> untyped
|
|
13
|
+
|
|
14
|
+
# @rbs (Exception) -> bool
|
|
15
|
+
def deadline_error?: (Exception) -> bool
|
|
8
16
|
end
|
|
9
17
|
end
|
|
10
18
|
end
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Generated from lib/solid_objects/doctor.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module SolidObjects
|
|
4
|
+
class Doctor
|
|
5
|
+
class Check
|
|
6
|
+
@name: Symbol
|
|
7
|
+
|
|
8
|
+
@status: Symbol
|
|
9
|
+
|
|
10
|
+
@message: String
|
|
11
|
+
|
|
12
|
+
attr_reader name: untyped
|
|
13
|
+
|
|
14
|
+
attr_reader status: untyped
|
|
15
|
+
|
|
16
|
+
attr_reader message: untyped
|
|
17
|
+
|
|
18
|
+
# @rbs (name: Symbol, status: Symbol, message: String) -> void
|
|
19
|
+
def initialize: (name: Symbol, status: Symbol, message: String) -> void
|
|
20
|
+
|
|
21
|
+
# @rbs () -> bool
|
|
22
|
+
def failed?: () -> bool
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class Report
|
|
26
|
+
@checks: Array[Check]
|
|
27
|
+
|
|
28
|
+
attr_reader checks: untyped
|
|
29
|
+
|
|
30
|
+
# @rbs (checks: Array[Check]) -> void
|
|
31
|
+
def initialize: (checks: Array[Check]) -> void
|
|
32
|
+
|
|
33
|
+
# @rbs () -> bool
|
|
34
|
+
def healthy?: () -> bool
|
|
35
|
+
|
|
36
|
+
# @rbs (Symbol) -> Check
|
|
37
|
+
def check: (Symbol) -> Check
|
|
38
|
+
|
|
39
|
+
# @rbs () -> String
|
|
40
|
+
def to_s: () -> String
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
EXPECTED_COLUMNS: untyped
|
|
44
|
+
|
|
45
|
+
class ProbeActor < Actor
|
|
46
|
+
# @rbs (value: String) -> String
|
|
47
|
+
def ping: (value: String) -> String
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
@configuration: Configuration
|
|
51
|
+
|
|
52
|
+
@connection: untyped
|
|
53
|
+
|
|
54
|
+
# @rbs (?connection: untyped, ?configuration: Configuration) -> void
|
|
55
|
+
def initialize: (?connection: untyped, ?configuration: Configuration) -> void
|
|
56
|
+
|
|
57
|
+
# @rbs () -> Report
|
|
58
|
+
def call: () -> Report
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
62
|
+
attr_reader connection: untyped
|
|
63
|
+
|
|
64
|
+
attr_reader configuration: untyped
|
|
65
|
+
|
|
66
|
+
# @rbs () -> Check
|
|
67
|
+
def check_configuration: () -> Check
|
|
68
|
+
|
|
69
|
+
# @rbs () -> Check
|
|
70
|
+
def check_schema: () -> Check
|
|
71
|
+
|
|
72
|
+
# @rbs () -> Check
|
|
73
|
+
def check_authorization: () -> Check
|
|
74
|
+
|
|
75
|
+
# @rbs () -> Check
|
|
76
|
+
def check_runtime: () -> Check
|
|
77
|
+
|
|
78
|
+
# @rbs () -> Check
|
|
79
|
+
def check_sync_round_trip: () -> Check
|
|
80
|
+
|
|
81
|
+
# @rbs (Check, Check) -> bool
|
|
82
|
+
def ready_for_round_trip?: (Check, Check) -> bool
|
|
83
|
+
|
|
84
|
+
# @rbs () -> Check
|
|
85
|
+
def skipped_runtime: () -> Check
|
|
86
|
+
|
|
87
|
+
# @rbs () -> Check
|
|
88
|
+
def skipped_round_trip: () -> Check
|
|
89
|
+
|
|
90
|
+
# @rbs () -> Hash[Symbol, Hash[Symbol, untyped]]
|
|
91
|
+
def policy_probes: () -> Hash[Symbol, Hash[Symbol, untyped]]
|
|
92
|
+
|
|
93
|
+
# @rbs () -> Array[String]
|
|
94
|
+
def expected_table_names: () -> Array[String]
|
|
95
|
+
|
|
96
|
+
# @rbs (Symbol, String) -> Check
|
|
97
|
+
def pass: (Symbol, String) -> Check
|
|
98
|
+
|
|
99
|
+
# @rbs (Symbol, String) -> Check
|
|
100
|
+
def info: (Symbol, String) -> Check
|
|
101
|
+
|
|
102
|
+
# @rbs (Symbol, String) -> Check
|
|
103
|
+
def warn_check: (Symbol, String) -> Check
|
|
104
|
+
|
|
105
|
+
# @rbs (Symbol, String) -> Check
|
|
106
|
+
def fail_check: (Symbol, String) -> Check
|
|
107
|
+
|
|
108
|
+
# @rbs (Symbol, String) -> Check
|
|
109
|
+
def skip: (Symbol, String) -> Check
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -4,6 +4,9 @@ module SolidObjects
|
|
|
4
4
|
class Error < StandardError
|
|
5
5
|
end
|
|
6
6
|
|
|
7
|
+
class NonRetryableError < Error
|
|
8
|
+
end
|
|
9
|
+
|
|
7
10
|
class UnsupportedDatabase < Error
|
|
8
11
|
end
|
|
9
12
|
|
|
@@ -40,7 +43,122 @@ module SolidObjects
|
|
|
40
43
|
class ActorDestroyed < LostActivation
|
|
41
44
|
end
|
|
42
45
|
|
|
46
|
+
class DatabaseDeadlineExceeded < Error
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class SyncEnqueueTimeout < Error
|
|
50
|
+
@timeout: Numeric
|
|
51
|
+
|
|
52
|
+
@actor_type: String
|
|
53
|
+
|
|
54
|
+
@actor_id: String
|
|
55
|
+
|
|
56
|
+
@message_name: String
|
|
57
|
+
|
|
58
|
+
attr_reader timeout: untyped
|
|
59
|
+
|
|
60
|
+
attr_reader actor_type: untyped
|
|
61
|
+
|
|
62
|
+
attr_reader actor_id: untyped
|
|
63
|
+
|
|
64
|
+
attr_reader message_name: untyped
|
|
65
|
+
|
|
66
|
+
# @rbs (timeout: Numeric, actor_type: String, actor_id: String, message_name: String) -> void
|
|
67
|
+
def initialize: (timeout: Numeric, actor_type: String, actor_id: String, message_name: String) -> void
|
|
68
|
+
end
|
|
69
|
+
|
|
43
70
|
class SyncTimeout < Error
|
|
71
|
+
@timeout: Numeric
|
|
72
|
+
|
|
73
|
+
@actor_type: String
|
|
74
|
+
|
|
75
|
+
@actor_id: String
|
|
76
|
+
|
|
77
|
+
@message_name: String
|
|
78
|
+
|
|
79
|
+
@message_id: Integer
|
|
80
|
+
|
|
81
|
+
@request_id: String
|
|
82
|
+
|
|
83
|
+
@sequence: Integer
|
|
84
|
+
|
|
85
|
+
@status: String
|
|
86
|
+
|
|
87
|
+
@waiting_on: String
|
|
88
|
+
|
|
89
|
+
@activation: Hash[String, untyped]
|
|
90
|
+
|
|
91
|
+
@blocker: Hash[String, untyped]?
|
|
92
|
+
|
|
93
|
+
attr_reader timeout: untyped
|
|
94
|
+
|
|
95
|
+
attr_reader actor_type: untyped
|
|
96
|
+
|
|
97
|
+
attr_reader actor_id: untyped
|
|
98
|
+
|
|
99
|
+
attr_reader message_name: untyped
|
|
100
|
+
|
|
101
|
+
attr_reader message_id: untyped
|
|
102
|
+
|
|
103
|
+
attr_reader request_id: untyped
|
|
104
|
+
|
|
105
|
+
attr_reader sequence: untyped
|
|
106
|
+
|
|
107
|
+
attr_reader status: untyped
|
|
108
|
+
|
|
109
|
+
attr_reader waiting_on: untyped
|
|
110
|
+
|
|
111
|
+
attr_reader activation: untyped
|
|
112
|
+
|
|
113
|
+
attr_reader blocker: untyped
|
|
114
|
+
|
|
115
|
+
# @rbs (timeout: Numeric, actor_type: String, actor_id: String, message_name: String, message_id: Integer, request_id: String, sequence: Integer, status: String, waiting_on: String, activation: Hash[String, untyped], blocker: Hash[String, untyped]?) -> void
|
|
116
|
+
def initialize: (timeout: Numeric, actor_type: String, actor_id: String, message_name: String, message_id: Integer, request_id: String, sequence: Integer, status: String, waiting_on: String, activation: Hash[String, untyped], blocker: Hash[String, untyped]?) -> void
|
|
117
|
+
|
|
118
|
+
# @rbs () -> MessageReference
|
|
119
|
+
def message_reference: () -> MessageReference
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
class SyncInsideTransaction < Error
|
|
123
|
+
@actor_type: String
|
|
124
|
+
|
|
125
|
+
@actor_id: String
|
|
126
|
+
|
|
127
|
+
@message_name: String
|
|
128
|
+
|
|
129
|
+
attr_reader actor_type: untyped
|
|
130
|
+
|
|
131
|
+
attr_reader actor_id: untyped
|
|
132
|
+
|
|
133
|
+
attr_reader message_name: untyped
|
|
134
|
+
|
|
135
|
+
# @rbs (actor_type: String, actor_id: String, message_name: String) -> void
|
|
136
|
+
def initialize: (actor_type: String, actor_id: String, message_name: String) -> void
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
class ApplicationWriteForbidden < NonRetryableError
|
|
140
|
+
@actor_type: String
|
|
141
|
+
|
|
142
|
+
@actor_id: String
|
|
143
|
+
|
|
144
|
+
@message_name: String
|
|
145
|
+
|
|
146
|
+
attr_reader actor_type: untyped
|
|
147
|
+
|
|
148
|
+
attr_reader actor_id: untyped
|
|
149
|
+
|
|
150
|
+
attr_reader message_name: untyped
|
|
151
|
+
|
|
152
|
+
# @rbs (actor_type: String, actor_id: String, message_name: String) -> void
|
|
153
|
+
def initialize: (actor_type: String, actor_id: String, message_name: String) -> void
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
class CommitActionUnavailable < NonRetryableError
|
|
157
|
+
# @rbs (actor_type: String, actor_id: String, message_name: String) -> void
|
|
158
|
+
def initialize: (actor_type: String, actor_id: String, message_name: String) -> void
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
class UnknownCommitAction < NonRetryableError
|
|
44
162
|
end
|
|
45
163
|
|
|
46
164
|
class Rejected < Error
|
|
@@ -21,6 +21,9 @@ module SolidObjects
|
|
|
21
21
|
# @rbs () -> Actor
|
|
22
22
|
def actor: () -> Actor
|
|
23
23
|
|
|
24
|
+
# @rbs (MessageContext) -> untyped
|
|
25
|
+
def invoke_actor: (MessageContext) -> untyped
|
|
26
|
+
|
|
24
27
|
# @rbs (Hash[String, untyped]) -> void
|
|
25
28
|
def ensure_query_did_not_mutate_state!: (Hash[String, untyped]) -> void
|
|
26
29
|
|
|
@@ -30,6 +33,15 @@ module SolidObjects
|
|
|
30
33
|
# @rbs (untyped, Hash[String, untyped]) -> void
|
|
31
34
|
def complete: (untyped, Hash[String, untyped]) -> void
|
|
32
35
|
|
|
36
|
+
# @rbs (Array[Actor::CommitActionIntent]) -> void
|
|
37
|
+
def execute_commit_actions: (Array[Actor::CommitActionIntent]) -> void
|
|
38
|
+
|
|
39
|
+
# @rbs (Actor::CommitActionIntent, Proc, CommitActionContext) -> untyped
|
|
40
|
+
def execute_commit_action: (Actor::CommitActionIntent, Proc, CommitActionContext) -> untyped
|
|
41
|
+
|
|
42
|
+
# @rbs () -> void
|
|
43
|
+
def ensure_application_database_is_shared!: () -> void
|
|
44
|
+
|
|
33
45
|
# @rbs (Message, Instance, Array[Actor::EffectIntent]) -> Array[Effect]
|
|
34
46
|
def enqueue_effects: (Message, Instance, Array[Actor::EffectIntent]) -> Array[Effect]
|
|
35
47
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Generated from lib/solid_objects/instance_pruner.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module SolidObjects
|
|
4
|
+
class InstancePruner
|
|
5
|
+
@now: Time
|
|
6
|
+
|
|
7
|
+
@batch_size: Integer
|
|
8
|
+
|
|
9
|
+
# @rbs (?now: Time, ?batch_size: Integer) -> void
|
|
10
|
+
def initialize: (?now: Time, ?batch_size: Integer) -> void
|
|
11
|
+
|
|
12
|
+
# @rbs () -> Integer
|
|
13
|
+
def preview: () -> Integer
|
|
14
|
+
|
|
15
|
+
# @rbs () -> Integer
|
|
16
|
+
def prune: () -> Integer
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
attr_reader now: untyped
|
|
21
|
+
|
|
22
|
+
attr_reader batch_size: untyped
|
|
23
|
+
|
|
24
|
+
# @rbs () -> Array[ActiveRecord::Relation[Instance]]
|
|
25
|
+
def policy_relations: () -> Array[ActiveRecord::Relation[Instance]]
|
|
26
|
+
|
|
27
|
+
# @rbs () -> ActiveRecord::Relation[Instance]
|
|
28
|
+
def prunable: () -> ActiveRecord::Relation[Instance]
|
|
29
|
+
|
|
30
|
+
# @rbs (ActiveRecord::Relation[Instance]) -> Integer
|
|
31
|
+
def prune_relation: (ActiveRecord::Relation[Instance]) -> Integer
|
|
32
|
+
|
|
33
|
+
# @rbs (Integer, ActiveRecord::Relation[Instance]) -> Integer
|
|
34
|
+
def prune_instance: (Integer, ActiveRecord::Relation[Instance]) -> Integer
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Generated from lib/solid_objects/message_pruner.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module SolidObjects
|
|
4
|
+
class MessagePruner
|
|
5
|
+
@now: Time
|
|
6
|
+
|
|
7
|
+
@batch_size: Integer
|
|
8
|
+
|
|
9
|
+
# @rbs (?now: Time, ?batch_size: Integer) -> void
|
|
10
|
+
def initialize: (?now: Time, ?batch_size: Integer) -> void
|
|
11
|
+
|
|
12
|
+
# @rbs () -> Integer
|
|
13
|
+
def preview: () -> Integer
|
|
14
|
+
|
|
15
|
+
# @rbs () -> Integer
|
|
16
|
+
def prune: () -> Integer
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
attr_reader now: untyped
|
|
21
|
+
|
|
22
|
+
attr_reader batch_size: untyped
|
|
23
|
+
|
|
24
|
+
# @rbs () -> Array[ActiveRecord::Relation[Message]]
|
|
25
|
+
def policy_relations: () -> Array[ActiveRecord::Relation[Message]]
|
|
26
|
+
|
|
27
|
+
# @rbs () -> ActiveRecord::Relation[Message]
|
|
28
|
+
def prunable: () -> ActiveRecord::Relation[Message]
|
|
29
|
+
|
|
30
|
+
# @rbs (ActiveRecord::Relation[Message]) -> Integer
|
|
31
|
+
def prune_relation: (ActiveRecord::Relation[Message]) -> Integer
|
|
32
|
+
|
|
33
|
+
# @rbs () -> Numeric
|
|
34
|
+
def default_retention: () -> Numeric
|
|
35
|
+
|
|
36
|
+
# @rbs () -> Hash[String, Numeric]
|
|
37
|
+
def retention_overrides: () -> Hash[String, Numeric]
|
|
38
|
+
|
|
39
|
+
# @rbs (Numeric) -> Time
|
|
40
|
+
def retention_cutoff: (Numeric) -> Time
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Generated from lib/solid_objects/process_pruner.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module SolidObjects
|
|
4
|
+
class ProcessPruner
|
|
5
|
+
@now: Time
|
|
6
|
+
|
|
7
|
+
@batch_size: Integer
|
|
8
|
+
|
|
9
|
+
# @rbs (?now: Time, ?batch_size: Integer) -> void
|
|
10
|
+
def initialize: (?now: Time, ?batch_size: Integer) -> void
|
|
11
|
+
|
|
12
|
+
# @rbs () -> Integer
|
|
13
|
+
def preview: () -> Integer
|
|
14
|
+
|
|
15
|
+
# @rbs () -> Integer
|
|
16
|
+
def prune: () -> Integer
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
attr_reader now: untyped
|
|
21
|
+
|
|
22
|
+
attr_reader batch_size: untyped
|
|
23
|
+
|
|
24
|
+
# @rbs () -> ActiveRecord::Relation[Process]
|
|
25
|
+
def prunable: () -> ActiveRecord::Relation[Process]
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -22,6 +22,9 @@ module SolidObjects
|
|
|
22
22
|
# @rbs (?authorization_context: untyped) -> bool
|
|
23
23
|
def destroy: (?authorization_context: untyped) -> bool
|
|
24
24
|
|
|
25
|
+
# @rbs (?authorization_context: untyped) -> StateSnapshot
|
|
26
|
+
def snapshot: (?authorization_context: untyped) -> StateSnapshot
|
|
27
|
+
|
|
25
28
|
# @rbs (Symbol, *untyped, **untyped) -> untyped
|
|
26
29
|
def method_missing: (Symbol, *untyped, **untyped) -> untyped
|
|
27
30
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Generated from lib/solid_objects/state_snapshot.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module SolidObjects
|
|
4
|
+
class StateSnapshot
|
|
5
|
+
@actor_class: Class
|
|
6
|
+
|
|
7
|
+
@data: Hash[String, untyped]
|
|
8
|
+
|
|
9
|
+
# @rbs (Reference) -> void
|
|
10
|
+
def initialize: (Reference) -> void
|
|
11
|
+
|
|
12
|
+
# @rbs () -> Hash[String, untyped]
|
|
13
|
+
def to_h: () -> Hash[String, untyped]
|
|
14
|
+
|
|
15
|
+
# @rbs (Symbol, *untyped, **untyped) -> untyped
|
|
16
|
+
def method_missing: (Symbol, *untyped, **untyped) -> untyped
|
|
17
|
+
|
|
18
|
+
# @rbs (Symbol, bool) -> bool
|
|
19
|
+
def respond_to_missing?: (Symbol, bool) -> bool
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
attr_reader actor_class: untyped
|
|
24
|
+
|
|
25
|
+
attr_reader data: untyped
|
|
26
|
+
|
|
27
|
+
# @rbs (Symbol | String) -> bool
|
|
28
|
+
def attribute?: (Symbol | String) -> bool
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Generated from lib/solid_objects/sync_deadline.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module SolidObjects
|
|
4
|
+
class SyncDeadline
|
|
5
|
+
KEY: ::Symbol
|
|
6
|
+
|
|
7
|
+
# @rbs (timeout: Numeric) { () -> untyped } -> untyped
|
|
8
|
+
def self.with: (timeout: Numeric) { () -> untyped } -> untyped
|
|
9
|
+
|
|
10
|
+
# @rbs () -> bool
|
|
11
|
+
def self.active?: () -> bool
|
|
12
|
+
|
|
13
|
+
# @rbs () -> bool
|
|
14
|
+
def self.expired?: () -> bool
|
|
15
|
+
|
|
16
|
+
# @rbs () -> Float
|
|
17
|
+
def self.remaining: () -> Float
|
|
18
|
+
|
|
19
|
+
# @rbs () -> Integer
|
|
20
|
+
def self.remaining_milliseconds: () -> Integer
|
|
21
|
+
|
|
22
|
+
# @rbs () -> Integer
|
|
23
|
+
def self.remaining_seconds: () -> Integer
|
|
24
|
+
|
|
25
|
+
# @rbs () -> Float?
|
|
26
|
+
private def self.deadline: () -> Float?
|
|
27
|
+
|
|
28
|
+
# @rbs () -> Float
|
|
29
|
+
private def self.monotonic_now: () -> Float
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Generated from lib/solid_objects/sync_diagnostics.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module SolidObjects
|
|
4
|
+
class SyncDiagnostics
|
|
5
|
+
# @rbs (Message, timeout: Numeric) -> SyncTimeout
|
|
6
|
+
def call: (Message, timeout: Numeric) -> SyncTimeout
|
|
7
|
+
|
|
8
|
+
private
|
|
9
|
+
|
|
10
|
+
# @rbs (Message) -> String
|
|
11
|
+
def message_status: (Message) -> String
|
|
12
|
+
|
|
13
|
+
# @rbs (Message, Instance, Message?) -> String
|
|
14
|
+
def waiting_reason: (Message, Instance, Message?) -> String
|
|
15
|
+
|
|
16
|
+
# @rbs (ReadyMessage?) -> bool
|
|
17
|
+
def future?: (ReadyMessage?) -> bool
|
|
18
|
+
|
|
19
|
+
# @rbs (Instance) -> bool
|
|
20
|
+
def live_activation?: (Instance) -> bool
|
|
21
|
+
|
|
22
|
+
# @rbs (Message) -> Message?
|
|
23
|
+
def earlier_blocker: (Message) -> Message?
|
|
24
|
+
|
|
25
|
+
# @rbs (Instance) -> Hash[String, untyped]
|
|
26
|
+
def activation_details: (Instance) -> Hash[String, untyped]
|
|
27
|
+
|
|
28
|
+
# @rbs (Process?) -> Hash[String, untyped]?
|
|
29
|
+
def process_details: (Process?) -> Hash[String, untyped]?
|
|
30
|
+
|
|
31
|
+
# @rbs (Message?) -> Hash[String, untyped]?
|
|
32
|
+
def blocker_details: (Message?) -> Hash[String, untyped]?
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -7,6 +7,9 @@ module SolidObjects
|
|
|
7
7
|
|
|
8
8
|
private
|
|
9
9
|
|
|
10
|
+
# @rbs (MessageReference, timeout: Numeric) -> untyped
|
|
11
|
+
def call_before_deadline: (MessageReference, timeout: Numeric) -> untyped
|
|
12
|
+
|
|
10
13
|
# @rbs (MessageReference) -> Message
|
|
11
14
|
def load_message: (MessageReference) -> Message
|
|
12
15
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Generated from lib/solid_objects/test_helper.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module SolidObjects
|
|
4
|
+
module TestHelper
|
|
5
|
+
# @rbs (Class) -> void
|
|
6
|
+
def self.included: (Class) -> void
|
|
7
|
+
|
|
8
|
+
# @rbs () -> void
|
|
9
|
+
def self.reset_actors!: () -> void
|
|
10
|
+
|
|
11
|
+
# @rbs () -> void
|
|
12
|
+
def reset_actors!: () -> void
|
|
13
|
+
|
|
14
|
+
# @rbs (?roles: Array[Symbol], ?max_passes: Integer) -> Integer
|
|
15
|
+
def drain_solid_objects: (?roles: Array[Symbol], ?max_passes: Integer) -> Integer
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
# @rbs (Array[Symbol]) -> Array[Worker | EffectExecutor | ReminderScheduler | BroadcastExecutor]
|
|
20
|
+
def build_solid_objects_runners: (Array[Symbol]) -> Array[Worker | EffectExecutor | ReminderScheduler | BroadcastExecutor]
|
|
21
|
+
|
|
22
|
+
# @rbs (Worker | EffectExecutor | ReminderScheduler | BroadcastExecutor) -> Integer
|
|
23
|
+
def solid_objects_runner_result: (Worker | EffectExecutor | ReminderScheduler | BroadcastExecutor) -> Integer
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -18,12 +18,21 @@ module SolidObjects
|
|
|
18
18
|
# @rbs (String | Symbol) { (Hash[String, untyped], EffectContext) -> untyped } -> Proc
|
|
19
19
|
def self.register_effect: (String | Symbol) { (Hash[String, untyped], EffectContext) -> untyped } -> Proc
|
|
20
20
|
|
|
21
|
+
# @rbs () -> CommitActionRegistry
|
|
22
|
+
def self.commit_action_registry: () -> CommitActionRegistry
|
|
23
|
+
|
|
24
|
+
# @rbs (String | Symbol) { (Hash[String, untyped], CommitActionContext) -> untyped } -> Proc
|
|
25
|
+
def self.register_commit_action: (String | Symbol) { (Hash[String, untyped], CommitActionContext) -> untyped } -> Proc
|
|
26
|
+
|
|
21
27
|
# @rbs () -> Client
|
|
22
28
|
def self.client: () -> Client
|
|
23
29
|
|
|
24
30
|
# @rbs () -> CallerProcess
|
|
25
31
|
def self.caller_process: () -> CallerProcess
|
|
26
32
|
|
|
33
|
+
# @rbs () -> bool
|
|
34
|
+
def self.reset_caller_process!: () -> bool
|
|
35
|
+
|
|
27
36
|
# @rbs () -> DeadLetterManager
|
|
28
37
|
def self.dead_letters: () -> DeadLetterManager
|
|
29
38
|
|
|
@@ -33,6 +42,9 @@ module SolidObjects
|
|
|
33
42
|
# @rbs (String, Class) -> Class
|
|
34
43
|
def self.register_actor: (String, Class) -> Class
|
|
35
44
|
|
|
45
|
+
# @rbs (untyped) -> untyped
|
|
46
|
+
def self.mutable_copy: (untyped) -> untyped
|
|
47
|
+
|
|
36
48
|
# @rbs () -> void
|
|
37
49
|
def self.reset!: () -> void
|
|
38
50
|
|