site-cookbooks/cluster_service_discovery/libraries/cluster_service_discovery.rb
def provide_service service_name, service_info={}
    Chef::Log.info("Registering to provide #{service_name}: #{service_info.inspect}")
    node.set[:provides_service][service_name] = {
      :timestamp  => ClusterServiceDiscovery.timestamp,
    }.merge(service_info)
    node.save
  end
# Register to provide the given service.
# If you pass in a hash of information, it will be added to
# the registry, and available to clients
Register to provide the given service.
If you pass in a hash of information, it will be added to
the registry, and available to clients
Register to provide the given service . If you pass in a hash of information it will be added to the registry and available to clients
def provide_service service_name, service_info={}
    Chef::Log.info("Registering to provide #{service_name}: #{service_info.inspect}")
    node.set[:provides_service][service_name] = {
      :timestamp  => ClusterServiceDiscovery.timestamp,
    }.merge(service_info)
    node.save
  end
def provide_service service_name , service_info = { } Chef :: Log . info ( "Registering to provide #{service_name}: #{service_info.inspect}" ) node . set [ :provides_service ] [ service_name ] = { :timestamp => ClusterServiceDiscovery . timestamp , } . merge ( service_info ) node . save end
Register to provide the given service.
Register to provide the given service .
service_name
service_info