qri: github.com/qri-io/qri/update Index | Files | Directories

package update

import "github.com/qri-io/qri/update"

Package update defines the update service


Package Files

daemon.go update.go


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

func DatasetToJob Uses

func DatasetToJob(ds *dataset.Dataset, periodicity string, opts *cron.DatasetOptions) (job *cron.Job, err error)

DatasetToJob converts a dataset to cron.Job

func Factory Uses

func Factory(context.Context) cron.RunJobFunc

Factory returns a function that can run jobs

func JobToCmd Uses

func JobToCmd(streams ioes.IOStreams, job *cron.Job) *exec.Cmd

JobToCmd returns an operating system command that will execute the given job wiring operating system in/out/errout to the provided iostreams.

func Path Uses

func Path(repoPath string) (path string, err error)

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 Uses

func PossibleShellScript(path string) bool

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 Uses

func ShellScriptToJob(path string, periodicity string, opts *cron.ShellScriptOptions) (job *cron.Job, err error)

ShellScriptToJob turns a shell script into cron.Job

func Start Uses

func Start(ctx context.Context, repoPath string, updateCfg *config.Update, daemonize bool) error

Start starts the update service

func Status Uses

func Status() (string, error)

Status returns the status details of the update service

func StopDaemon Uses

func StopDaemon(repoPath string) error

StopDaemon checks for a running daemon, uninstalling it if one exists


cronPackage cron schedules dataset and shell script updates

Package update imports 15 packages (graph) and is imported by 1 packages. Updated 2019-09-13. Refresh now. Tools for package owners.