update

package
v0.9.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package update defines the update service

Index

Constants

View Source
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

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

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

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

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

ShellScriptToJob turns a shell script into cron.Job

func Start

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

Start starts the update service

func Status

func Status() (string, error)

Status returns the status details of the update service

func StopDaemon

func StopDaemon(repoPath string) error

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

Types

This section is empty.

Directories

Path Synopsis
Package cron schedules dataset and shell script updates
Package cron schedules dataset and shell script updates

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL