Documentation ¶
Overview ¶
Package update defines the update service
Index ¶
- Constants
- func DatasetToJob(ds *dataset.Dataset, periodicity string, opts *cron.DatasetOptions) (job *cron.Job, err error)
- func Factory(context.Context) cron.RunJobFunc
- func JobToCmd(streams ioes.IOStreams, job *cron.Job) *exec.Cmd
- func Path(repoPath string) (path string, err error)
- func PossibleShellScript(path string) bool
- func ShellScriptToJob(path string, periodicity string, opts *cron.ShellScriptOptions) (job *cron.Job, err error)
- func Start(ctx context.Context, repoPath string, updateCfg *config.Update, daemonize bool) error
- func Status() (string, error)
- func StopDaemon(repoPath string) error
Constants ¶
const RepoDirName = "update"
RepoDirName is the directory within repo to store update data using the default path, it'll work out to $HOME/.qri/update
Variables ¶
This section is empty.
Functions ¶
func DatasetToJob ¶
func DatasetToJob(ds *dataset.Dataset, periodicity string, opts *cron.DatasetOptions) (job *cron.Job, err error)
DatasetToJob converts a dataset to cron.Job
func Factory ¶
func Factory(context.Context) cron.RunJobFunc
Factory returns a function that can run jobs
func JobToCmd ¶
JobToCmd returns an operating system command that will execute the given job wiring operating system in/out/errout to the provided iostreams.
func Path ¶
Path returns a directory within a repo for storing data related to the update service. update data is stored in a directory called "update"
func PossibleShellScript ¶
PossibleShellScript checks a path to see if it might be a shell script TODO (b5) - deal with platforms that don't use '.sh' as a script extension (windows?)
func ShellScriptToJob ¶
func ShellScriptToJob(path string, periodicity string, opts *cron.ShellScriptOptions) (job *cron.Job, err error)
ShellScriptToJob turns a shell script into cron.Job
func StopDaemon ¶
StopDaemon checks for a running daemon, uninstalling it if one exists
Types ¶
This section is empty.