Class: Legion::Extensions::Node::Transport::Messages::ClusterKillswitch
- Inherits:
-
Transport::Message
- Object
- Transport::Message
- Legion::Extensions::Node::Transport::Messages::ClusterKillswitch
- Defined in:
- lib/legion/extensions/node/transport/messages/cluster_killswitch.rb
Constant Summary collapse
- ROUTING_KEY =
'settings.extensions.blocked'
Instance Method Summary collapse
- #encrypt? ⇒ Boolean
- #exchange ⇒ Object
- #message ⇒ Object
- #routing_key ⇒ Object
- #type ⇒ Object
- #validate ⇒ Object
Instance Method Details
#encrypt? ⇒ Boolean
25 26 27 |
# File 'lib/legion/extensions/node/transport/messages/cluster_killswitch.rb', line 25 def encrypt? false end |
#exchange ⇒ Object
17 18 19 |
# File 'lib/legion/extensions/node/transport/messages/cluster_killswitch.rb', line 17 def exchange Legion::Extensions::Node::Transport::Exchanges::ClusterControl end |
#message ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/legion/extensions/node/transport/messages/cluster_killswitch.rb', line 29 def Legion::Extensions::Node::ControlAuth.sign( function: 'update_settings', settings: { extensions: { blocked: [@options[:extension]] } }, restart: true ) end |
#routing_key ⇒ Object
13 14 15 |
# File 'lib/legion/extensions/node/transport/messages/cluster_killswitch.rb', line 13 def routing_key ROUTING_KEY end |
#type ⇒ Object
21 22 23 |
# File 'lib/legion/extensions/node/transport/messages/cluster_killswitch.rb', line 21 def type 'task' end |
#validate ⇒ Object
37 38 39 40 41 |
# File 'lib/legion/extensions/node/transport/messages/cluster_killswitch.rb', line 37 def validate raise 'extension must be a String' unless @options[:extension].is_a?(String) @valid = true end |