Sha256: 80adab1bce2db0ef66da1bd02d59eccafdb55ba3a2a10f042163e3e351fcde12

Contents?: true

Size: 473 Bytes

Versions: 12

Compression:

Stored size: 473 Bytes

Contents

module Meroku
  module Infrastructure
    # A server hosts the api (called during signup, login, etc)
    # and atm also hosts end users applications
    class Server
      include Meroku::Aws::Ec2

      attr_reader :instance_id

      def initialize(instance_id)
        @instance_id = instance_id
      end

      def shutdown
        puts "Will terminate #{@instance_id}"
        ec2_client.terminate_instances(instance_ids: [@instance_id])
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
meroku-2.0.22 lib/meroku/infrastructure/server.rb
meroku-2.0.21 lib/meroku/infrastructure/server.rb
meroku-2.0.20 lib/meroku/infrastructure/server.rb
meroku-2.0.19 lib/meroku/infrastructure/server.rb
meroku-2.0.18 lib/meroku/infrastructure/server.rb
meroku-2.0.17 lib/meroku/infrastructure/server.rb
meroku-2.0.16 lib/meroku/infrastructure/server.rb
meroku-2.0.14 lib/meroku/infrastructure/server.rb
meroku-2.0.13 lib/meroku/infrastructure/server.rb
meroku-2.0.11 lib/meroku/infrastructure/server.rb
meroku-2.0.10 lib/meroku/infrastructure/server.rb
meroku-2.0.9 lib/meroku/infrastructure/server.rb