Sha256: 1bf5f525669f1dd1ad480ff1da7fd7ca94db0a63bd7f186ba09f7c307e6350a1

Contents?: true

Size: 772 Bytes

Versions: 8

Compression:

Stored size: 772 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 :behaviour, 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

8 entries across 8 versions & 1 rubygems

Version Path
consul-ruby-client-0.0.9 lib/consul/model/session.rb
consul-ruby-client-0.0.8 lib/consul/model/session.rb
consul-ruby-client-0.0.7 lib/consul/model/session.rb
consul-ruby-client-0.0.6 lib/consul/model/session.rb
consul-ruby-client-0.0.5 lib/consul/model/session.rb
consul-ruby-client-0.0.4 lib/consul/model/session.rb
consul-ruby-client-0.0.3 lib/consul/model/session.rb
consul-ruby-client-0.0.2 lib/consul/model/session.rb