// Reload sends SIGHUP to keepalived to reload the configuration.
166012
func (k *keepalived) Reload() error {
	if !k.started {
		// TODO: add a warning indicating that keepalived is not started?
		return nil
	}

	glog.Info("reloading keepalived")
	err := syscall.Kill(k.cmd.Process.Pid, syscall.SIGHUP)
	if err != nil {
		return fmt.Errorf("error reloading keepalived: %v", err)
	}

	return nil
}
581722
func (b *UpdateService) Refresh(refresh string) *UpdateService {
	b.refresh = refresh
	return b
}
324540
func (mod *HueBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("address", &mod.bridge)
	options.Bind("key", &mod.key)

	mod.client = hue.NewBridge(mod.bridge, mod.key)
}
1073609
func reload(l net.Listener, httpServer *http.Server) error {
	const errLoc = "main.reload()"

	// Making duplicate for socket descriptor
	// to use them in child process.
	file, err := (l.(*net.TCPListener)).File()
	if err != nil {
		return fmt.Errorf(
			"%s: failed to get file of listener, reason -> %s",
			errLoc, err.Error(),
		)
	}
	fd, err := syscall.Dup(int(file.Fd()))
	file.Close()
	if err != nil {
		return fmt.Errorf(
			"%s: failed to dup(2) listener, reason -> %s", errLoc, err.Error(),
		)
	}
	if err := os.Setenv(envVarName, fmt.Sprint(fd)); err != nil {
		return fmt.Errorf(
			"%s: failed to write fd into environment variable, reason -> %s",
			errLoc, err.Error(),
		)
	}

	// Unlock PID file to start normally child process.
	daemon.UnlockPidFile()

	// Start child process.
	cmd := exec.Command(daemon.AppPath)
	if err := cmd.Start(); err != nil {
		return fmt.Errorf(
			"%s: failed to start child process, reason -> %s",
			errLoc, err.Error(),
		)
	}

	select {
	// Waiting for notification from child process that it starts successfully.
	// In real application it's better to move generation of chan for this case
	// before calling cmd.Start() to be sure to catch signal in any case.
	case <-func() <-chan os.Signal {
		sig := make(chan os.Signal)
		signal.Notify(sig, syscall.SIGUSR1)
		return sig
	}():
	// If child process stopped without sending signal.
	case <-func() chan struct{} {
		ch := make(chan struct{}, 1)
		go func() {
			cmd.Wait()
			ch <- struct{}{}
		}()
		return ch
	}():
		err = fmt.Errorf("%s: child process stopped unexpectably", errLoc)
	// Timeout for waiting signal from child process.
	case <-time.After(10 * time.Second):
		err = fmt.Errorf(
			"%s: child process is not responding, closing by timeout", errLoc,
		)
	}

	// Dealing with keep-alive connections.
	httpServer.SetKeepAlivesEnabled(false)
	time.Sleep(100 * time.Millisecond)

	// Close current listener (stop server in fact).
	l.Close()
	return err
}
1196596
func (c *CustomMounterHandler) Reload(device string) error {
	return c.cr(device, c.mounts, c.paths)
}
1341335
func (mod *SpaceAPIBee) ReloadOptions(options bees.BeeOptions) {
	mod.SetOptions(options)

	options.Bind("url", &mod.url)
}
817497
func (r *Pod) Reload() (*Pod, error) {
	return r.collection.Get(r.Metadata.Name)
}
1145161
func (c *Client) Reload(newConfig *config.Config) error {
	shouldReloadTLS, err := tlsutil.ShouldReloadRPCConnections(c.config.TLSConfig, newConfig.TLSConfig)
	if err != nil {
		c.logger.Error("error parsing TLS configuration", "error", err)
		return err
	}

	if shouldReloadTLS {
		return c.reloadTLSConnections(newConfig.TLSConfig)
	}

	return nil
}
574520
func (c *Credentials) Refresh() {
	c.mu.Lock()
	defer c.mu.Unlock()

	c.forceRefresh = true
}
481274
func (f *File) Reload() (err error) {
	for _, s := range f.dataSources {
		if err = f.reload(s); err != nil {
			// In loose mode, we create an empty default section for nonexistent files.
			if os.IsNotExist(err) && f.options.Loose {
				f.parse(bytes.NewBuffer(nil))
				continue
			}
			return err
		}
	}
	return nil
}
426339
func (p *ChangePoller) Refresh(c context.Context) error {
	var meta config.Meta
	if err := cfgclient.Get(c, cfgclient.AsService, p.ConfigSet, p.Path, nil, &meta); err != nil {
		return errors.Annotate(err, "failed to reload config %s :: %s", p.ConfigSet, p.Path).Err()
	}

	p.ContentHash = meta.ContentHash
	return nil
}
412970
func (m *nfsMounter) Reload(source string) error {
	newNFSm, err := NewNFSMounter([]string{NFSAllServers},
		m.mountImpl,
		m.Mounter.allowedDirs,
	)
	if err != nil {
		return err
	}
	newNFSmounter, ok := newNFSm.(*nfsMounter)
	if !ok {
		return fmt.Errorf("Internal error failed to convert %T",
			newNFSmounter)
	}

	return m.reload(source, newNFSmounter.mounts[source])
}
438127
func (fs *FSObjects) ReloadFormat(ctx context.Context, dryRun bool) error {
	logger.LogIf(ctx, NotImplemented{})
	return NotImplemented{}
}
725885
func (cfg *Config) load(storage util.Storage) {
	if b, err := storage.Get("uuid"); err == nil && len(b) > 0 {
		cfg.id = string(b)
	}

	if b, err := storage.Get("version"); err == nil && len(b) > 0 {
		cfg.version = to.Int64(string(b))
	}

	if b, err := storage.Get("configHash"); err == nil && len(b) > 0 {
		cfg.configHash = b
	}
}
1005647
func (s *Storage) LoadRefresh(code string) (*osin.AccessData, error) {
	var refresh service.Refresh
	if err := dbconn.DB.Where("token = ?", code).Find(&refresh).Error; err != nil {
		return nil, err
	}
	return s.LoadAccess(refresh.Access)
}
175315
func (r *ReplicationController) Reload() (*ReplicationController, error) {
	return r.collection.Get(r.Metadata.Name)
}
611633
func (daemon *Daemon) reloadPlatform(config *config.Config, attributes map[string]string) error {
	return nil
}