func HostFromDir(hostdir string) (*Host, error) {
	confPath := path.Join(hostdir, hostConfFile)

	h := &Host{}
	err := loadJson(h, confPath)
	if err != nil {
		return nil, microerror.Mask(err)
	}

	h.hostDir, err = os.Open(hostdir)
	if err != nil {
		return nil, microerror.Mask(err)
	}

	fi, err := os.Stat(confPath)
	if err != nil {
		return nil, microerror.Mask(err)
	}
	h.lastModTime = fi.ModTime()

	return h, nil
}
// HostFromDir takes a path to a host directory within the cluster directory
// and loads the found configuration. Then the corresponding Host is returned.
HostFromDir takes a path to a host directory within the cluster directory
and loads the found configuration. Then the corresponding Host is returned.
// HostFromDir takes a path to a host directory within the cluster directory // and loads the found configuration . Then the corresponding Host is returned .
func HostFromDir(hostdir string) (*Host, error) {
	confPath := path.Join(hostdir, hostConfFile)
	h := &Host{}
	err := loadJson(h, confPath)
	if err != nil {
		return nil, microerror.Mask(err)
	}
	h.hostDir, err = os.Open(hostdir)
	if err != nil {
		return nil, microerror.Mask(err)
	}
	fi, err := os.Stat(confPath)
	if err != nil {
		return nil, microerror.Mask(err)
	}
	h.lastModTime = fi.ModTime()
	return h, nil
}
func HostFromDir ( hostdir string ) ( * Host , error ) { confPath := path . Join ( hostdir , hostConfFile ) h := & Host { } err := loadJson ( h , confPath ) if err != nil { return nil , microerror . Mask ( err ) } h . hostDir , err = os . Open ( hostdir ) if err != nil { return nil , microerror . Mask ( err ) } fi , err := os . Stat ( confPath ) if err != nil { return nil , microerror . Mask ( err ) } h . lastModTime = fi . ModTime ( ) return h , nil }
HostFromDir takes a path to a host directory within the cluster directory
and loads the found configuration.
HostFromDir takes a path to a host directory within the cluster directory and loads the found configuration .