process

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

README

Process service

Process service is responsible for starting, stopping and checking the status of a custom application.

Service Id Action Description Request Response
process status check status of an application StatusRequest StatusResponse
process start start provided application StartRequest StartResponse
process stop kill requested application StopRequest RunResponse

Documentation

Index

Constants

View Source
const ServiceID = "process"

ServiceID represents a system process service id

Variables

This section is empty.

Functions

func New

func New() endly.Service

New creates new system process service.

Types

type Info

type Info struct {
	Name      string
	Pid       int
	Command   string
	Arguments []string
	Stdin     string
	Stdout    string
}

Info represents process info

type StartRequest

type StartRequest struct {
	Target          *url.Resource `required:"true" description:"host where process will be started"`
	Command         string        `required:"true" description:"command to start process"`
	Options         *exec.Options
	Directory       string
	Arguments       []string
	AsSuperUser     bool
	ImmuneToHangups bool `description:"start process as nohup"`
}

StartRequest represents a start request

func NewStartRequestFromURL added in v0.25.1

func NewStartRequestFromURL(URL string) (*StartRequest, error)

NewStartRequestFromURL creates a new request from URL

type StartResponse

type StartResponse struct {
	Command string
	Info    []*Info
}

StartResponse represents a start response

type StatusRequest

type StatusRequest struct {
	Target       *url.Resource
	Command      string `` /* 133-byte string literal not displayed */
	ExactCommand bool   `description:"if this flag set do not try detect actual command but return all processes matched by command"`
}

StatusRequest represents a status check request

type StatusResponse

type StatusResponse struct {
	Processes []*Info
	Pid       int
}

StatusResponse represents a status check response

type StopAllRequest

type StopAllRequest struct {
	Target *url.Resource
	Input  string
}

StopAllRequest represents a stop all processes matching provided name request

type StopAllResponse

type StopAllResponse struct {
	Stdout string
}

StopAllResponse represents a stop all response

type StopRequest

type StopRequest struct {
	Target *url.Resource
	Pid    int
}

StopRequest represents a stop request

type StopResponse

type StopResponse struct {
	Stdout string
}

StopResponse represents a stop response

Jump to

Keyboard shortcuts

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