mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
This commit adds reload command to ctrld for re-fetch new config from ContorlD API or re-read the current config on disk.
19 lines
292 B
Go
19 lines
292 B
Go
package cli
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
func notifyReloadSigCh(ch chan os.Signal) {}
|
|
|
|
func (p *prog) sendReloadSignal() error {
|
|
select {
|
|
case p.reloadCh <- struct{}{}:
|
|
return nil
|
|
case <-time.After(5 * time.Second):
|
|
}
|
|
return errors.New("timeout while sending reload signal")
|
|
}
|