Documentation ¶
Index ¶
- Constants
- Variables
- func AllUsersWithSockets() ([]*user.User, error)
- func Chown(path string, usr *user.User) error
- func CmdSocketPath(usr *user.User) string
- func EtcDirPath() string
- func InitSettings(params InitSettingsParams) error
- func JobberShouldRunForUser(usr *user.User) bool
- func LibexecDirPath() string
- func LibexecProgramPath(name string) string
- func LogAllToStderr()
- func LogToStdoutStderr()
- func LongVersionStr() string
- func MakeCmdExitedChan(cmd *exec.Cmd) <-chan error
- func MakeDefaultPrefs(params InitSettingsParams) string
- func PerUserDirPath(usr *user.User) string
- func PrintPaths()
- func SetLogFile(paths ...string)
- func ShortVersionStr() string
- func Sudo(usr user.User, cmdStr string) *exec.Cmd
- func TempDirPath() string
- func UseSyslog() error
- func UserOwnsFile(usr *user.User, path string) (bool, error)
- func UserOwnsFileF(usr *user.User, f *os.File) (bool, error)
- func VarDirPath() string
- type Error
- type ExecResult
- type InitSettingsParams
- type SubprocFate
- type UserSpec
Constants ¶
View Source
const (
DaemonSocketAddr string = "/var/jobber_daemon.sock"
)
Variables ¶
Functions ¶
func AllUsersWithSockets ¶ added in v1.3.0
Get a list of all users for whom there is a jobberrunner process.
func CmdSocketPath ¶ added in v1.3.0
func EtcDirPath ¶ added in v1.4.2
func EtcDirPath() string
func InitSettings ¶ added in v1.4.2
func InitSettings(params InitSettingsParams) error
func JobberShouldRunForUser ¶ added in v1.4.2
func LibexecDirPath ¶ added in v1.4.2
func LibexecDirPath() string
func LibexecProgramPath ¶ added in v1.4.2
func LogAllToStderr ¶ added in v1.4.2
func LogAllToStderr()
func LogToStdoutStderr ¶ added in v1.3.0
func LogToStdoutStderr()
func LongVersionStr ¶
func LongVersionStr() string
func MakeCmdExitedChan ¶ added in v1.3.0
func MakeDefaultPrefs ¶ added in v1.4.2
func MakeDefaultPrefs(params InitSettingsParams) string
func PerUserDirPath ¶ added in v1.3.0
func PrintPaths ¶ added in v1.4.2
func PrintPaths()
func SetLogFile ¶ added in v1.3.0
func SetLogFile(paths ...string)
func ShortVersionStr ¶
func ShortVersionStr() string
func TempDirPath ¶ added in v1.4.2
func TempDirPath() string
func VarDirPath ¶ added in v1.3.0
func VarDirPath() string
Types ¶
type ExecResult ¶ added in v1.3.0
type ExecResult struct { Stdout io.ReadSeeker Stderr io.ReadSeeker Fate SubprocFate }
An ExecResult describes the result of running a subprocess via ExecAndWait. Stdout and Stderr can be used to get the subprocess's stdout and stderr. When done with this object (e.g., when done reading Stdout/Stderr), you must call Close.
func ExecAndWait ¶ added in v1.3.0
func ExecAndWait(args []string, input []byte) (*ExecResult, error)
func ExecAndWaitContext ¶ added in v1.4.3
func (*ExecResult) Close ¶ added in v1.4.3
func (self *ExecResult) Close()
func (*ExecResult) ReadStderr ¶ added in v1.4.3
func (self *ExecResult) ReadStderr(max int) ([]byte, error)
func (*ExecResult) ReadStdout ¶ added in v1.4.3
func (self *ExecResult) ReadStdout(max int) (data []byte, err error)
type InitSettingsParams ¶ added in v1.4.2
type SubprocFate ¶ added in v1.4.3
type SubprocFate int
const ( SubprocFateSucceeded SubprocFate = iota SubprocFateFailed SubprocFate = iota SubprocFateCancelled SubprocFate = iota )
func (SubprocFate) String ¶ added in v1.4.3
func (self SubprocFate) String() string
Click to show internal directories.
Click to hide internal directories.