Sha256: 47f1e807d1317c484980c8ee70eefbf6835c74bcaaed4fa2c1c4493ccf98d60d

Contents?: true

Size: 719 Bytes

Versions: 1

Compression:

Stored size: 719 Bytes

Contents

module Legion::Transport::Messages
  class RequestClusterSecret < Legion::Transport::Message
    def routing_key
      'node.crypt.push_cluster_secret'
    end

    def message
      { function: 'push_cluster_secret',
        node_name: Legion::Settings[:client][:name],
        queue_name: "node.#{Legion::Settings['client']['name']}",
        runner_class: 'Legion::Extensions::Node::Runners::Crypt',
        public_key: Base64.encode64(Legion::Crypt.public_key) }
    end

    def exchange
      require 'legion/transport/exchanges/node'
      Legion::Transport::Exchanges::Node
    end

    def encrypt?
      false
    end

    def type
      'task'
    end

    def validate
      @valid = true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
legion-transport-1.0.0 lib/legion/transport/messages/request_cluster_secret.rb