Sha256: 3b80155518fb7ddb5c2562efb3c11aea3df089b762fd65aa8e04492b136017a9

Contents?: true

Size: 833 Bytes

Versions: 12

Compression:

Stored size: 833 Bytes

Contents

require 'representable/json'
require 'ostruct'
require_relative 'health_check'

module Consul
  module Model

    # Consul Service Representation.
    class Service < OpenStruct
      module Representer
        include Representable::JSON
        include Representable::Hash
        include Representable::Hash::AllowSymbols

        # Attributes that can be both configured as well read.
        property :id, as: :ID
        property :service, as: :Service
        property :tags, as: :Tags
        property :address, as: :Address
        property :port, as: :Port

        # Attributes only defined at initialization time
        property :name, as: :Name
        property :check, as: :Check, extend: Consul::Model::HealthCheck::Representer, class: Consul::Model::HealthCheck
      end
      extend Representer

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
consul-ruby-client-0.0.13 lib/consul/model/service.rb
consul-ruby-client-0.0.12 lib/consul/model/service.rb
consul-ruby-client-0.0.11 lib/consul/model/service.rb
consul-ruby-client-0.0.10 lib/consul/model/service.rb
consul-ruby-client-0.0.9 lib/consul/model/service.rb
consul-ruby-client-0.0.8 lib/consul/model/service.rb
consul-ruby-client-0.0.7 lib/consul/model/service.rb
consul-ruby-client-0.0.6 lib/consul/model/service.rb
consul-ruby-client-0.0.5 lib/consul/model/service.rb
consul-ruby-client-0.0.4 lib/consul/model/service.rb
consul-ruby-client-0.0.3 lib/consul/model/service.rb
consul-ruby-client-0.0.2 lib/consul/model/service.rb