Class: Cosmos::AutonomicTopic
- Defined in:
- lib/cosmos/topics/autonomic_topic.rb
Constant Summary collapse
- PRIMARY_KEY =
"__cosmos_autonomic"
Class Method Summary collapse
-
.write_notification(notification, scope:) ⇒ Object
Notify to the topic.
Methods inherited from Topic
clear_topics, initialize_streams, read_topics, topics
Class Method Details
.write_notification(notification, scope:) ⇒ Object
Notify to the topic
“‘json
{
"kind" => "created",
"type" => "trigger",
"data" => {
"name" => "foobar",
"target": "INST",
"packet": "ADCS",
"left": {
"type": "item",
"item": "POSX",
},
"operation": ">",
"right": {
"type": "value",
"value": 690000,
}
}
}
“‘
48 49 50 |
# File 'lib/cosmos/topics/autonomic_topic.rb', line 48 def self.write_notification(notification, scope:) Store.write_topic("#{scope}#{PRIMARY_KEY}", notification, '*', 1000) end |