// Run starts syncing the folder between the local host and the remote
// container. It is expected that syncthing is already running locally (
// normally started by Syncthing).
Run starts syncing the folder between the local host and the remote
container. It is expected that syncthing is already running locally (
normally started by Syncthing).
// Run starts syncing the folder between the local host and the remote // container . It is expected that syncthing is already running locally ( // normally started by Syncthing ) .
func (f *Folder) Run() error {
	f.Status = ServiceStarting
	if err := f.initRadarClient(); err != nil {
		return err
	}
	if err := f.refreshSyncthing(); err != nil {
		return err
	}
	apiPort, listenerPort, err := f.connection.Syncthing()
	if err != nil {
		return err
	}
	f.initErrorHandler()
	if f.Reload {
		if err := f.hotReload(); err != nil {
			return err
		}
	}
	if err := f.initServers(apiPort); err != nil {
		return err
	}
	if err := f.watchEvents(); err != nil {
		return err
	}
	return f.beginSync(listenerPort)
}
func ( f * Folder ) Run ( ) error { f . Status = ServiceStarting if err := f . initRadarClient ( ) ; err != nil { return err } if err := f . refreshSyncthing ( ) ; err != nil { return err } apiPort , listenerPort , err := f . connection . Syncthing ( ) if err != nil { return err } f . initErrorHandler ( ) if f . Reload { if err := f . hotReload ( ) ; err != nil { return err } } if err := f . initServers ( apiPort ) ; err != nil { return err } if err := f . watchEvents ( ) ; err != nil { return err } return f . beginSync ( listenerPort ) }
Run starts syncing the folder between the local host and the remote
container.
Run starts syncing the folder between the local host and the remote container .