subprocess

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

* Copyright (C) 2020-2021 Arm Limited or its affiliates and Contributors. All rights reserved. * SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, loggers logs.Loggers, messageOnStart string, messageOnSuccess, messageOnFailure string, cmd string, args ...string) (err error)

Executes a command

Types

type Subprocess

type Subprocess struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, loggers logs.Loggers, messageOnStart string, messageOnSuccess, messageOnFailure string, cmd string, args ...string) (p *Subprocess, err error)

Creates a subprocess description.

func (*Subprocess) Cancel

func (s *Subprocess) Cancel()

func (*Subprocess) Check

func (s *Subprocess) Check() (err error)

Checks whether the subprocess is correctly defined.

func (*Subprocess) Execute

func (s *Subprocess) Execute() (err error)

Executes the command and waits to completion.

func (*Subprocess) IsOn

func (s *Subprocess) IsOn() bool

States whether the subprocess is on or not

func (*Subprocess) Restart

func (s *Subprocess) Restart() (err error)

Restarts a process.

func (*Subprocess) Setup

func (s *Subprocess) Setup(ctx context.Context, loggers logs.Loggers, messageOnStart string, messageOnSuccess, messageOnFailure string, cmd string, args ...string) (err error)

Sets up a sub-process.

func (*Subprocess) Start

func (s *Subprocess) Start() (err error)

Starts the process if not already started

func (*Subprocess) Stop

func (s *Subprocess) Stop() (err error)

Stops the process if currently working

Jump to

Keyboard shortcuts

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