code: func serviceToInstance(service *registry.Service) (*fargo.Instance, error) {
  	if len(service.Nodes) == 0 {
  		return nil, errors.New("Require nodes")
  	}
  
  	node := service.Nodes[0]
  
  	instance := &fargo.Instance{
  		App:              service.Name,
  		HostName:         node.Address,
  		IPAddr:           node.Address,
  		VipAddress:       node.Address,
  		SecureVipAddress: node.Address,
  		Port:             node.Port,
  		Status:           fargo.UP,
  		UniqueID: func(i fargo.Instance) string {
  			return fmt.Sprintf("%s:%s", node.Address, node.Id)
  		},
  		DataCenterInfo: fargo.DataCenterInfo{Name: fargo.MyOwn},
  	}
  
  	// set version
  	instance.SetMetadataString("version", service.Version)
  
  	// set instance ID
  	instance.SetMetadataString("instanceId", node.Id)
  
  	// set endpoints
  	if b, err := json.Marshal(service.Endpoints); err == nil {
  		instance.SetMetadataString("endpoints", string(b))
  	}
  
  	// set metadata
  	if b, err := json.Marshal(node.Metadata); err == nil {
  		instance.SetMetadataString("metadata", string(b))
  	}
  
  	return instance, nil
  }
docs: // only parses first node