Sha256: 5c021ab505a6fdd9a2e07f8a3a4e4e09dca44b1a976ee41c0b17832b8f06a4d0

Contents?: true

Size: 771 Bytes

Versions: 4

Compression:

Stored size: 771 Bytes

Contents

require 'representable/json'
require 'ostruct'

module Consul
  module Model

    # Consul Session representation.
    class Session < OpenStruct
      module Representer
        include Representable::JSON
        include Representable::Hash
        include Representable::Hash::AllowSymbols

        # Properties that are intended to be written by clients.
        property :lock_delay, as: :LockDelay
        property :name, as: :Name
        property :node, as: :Node
        collection :checks, as: :Checks
        property :behavior, as: :Behavior
        property :ttl, as: :TTL

        # Properties that exclusively read access.
        property :id, as: :ID
        property :create_index, as: :CreateIndex
      end
      extend Representer
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
consul-ruby-client-0.0.13 lib/consul/model/session.rb
consul-ruby-client-0.0.12 lib/consul/model/session.rb
consul-ruby-client-0.0.11 lib/consul/model/session.rb
consul-ruby-client-0.0.10 lib/consul/model/session.rb