Documentation ¶
Overview ¶
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- type MonitoredProc
- type ProcManager
- func (p *ProcManager) Run(logName, command string, args ...string) error
- func (p *ProcManager) RunWithCombinedOutput(logName, command string, args ...string) (string, error)
- func (p *ProcManager) RunWithOutput(logName, command string, args ...string) (string, error)
- func (p *ProcManager) Shutdown() error
- func (p *ProcManager) Start(name, command, procSearchPattern string, policy ProcStartPolicy, ...) (*MonitoredProc, error)
- type ProcStartPolicy
Constants ¶
const ( StartAction = "start" RunAction = "run" StopAction = "stop" RestartExisting ProcStartPolicy = iota ReuseExisting )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MonitoredProc ¶
type MonitoredProc struct {
// contains filtered or unexported fields
}
func (*MonitoredProc) Monitor ¶
func (p *MonitoredProc) Monitor(logName string)
func (*MonitoredProc) Stop ¶
func (p *MonitoredProc) Stop(mon bool) error
type ProcManager ¶
func (*ProcManager) Run ¶
func (p *ProcManager) Run(logName, command string, args ...string) error
Start a child process and wait for its completion
func (*ProcManager) RunWithCombinedOutput ¶
func (p *ProcManager) RunWithCombinedOutput(logName, command string, args ...string) (string, error)
Start a child process and wait for its completion
func (*ProcManager) RunWithOutput ¶
func (p *ProcManager) RunWithOutput(logName, command string, args ...string) (string, error)
Start a child process and wait for its completion
func (*ProcManager) Shutdown ¶
func (p *ProcManager) Shutdown() error
func (*ProcManager) Start ¶
func (p *ProcManager) Start(name, command, procSearchPattern string, policy ProcStartPolicy, args ...string) (*MonitoredProc, error)
Start the given process with the provided arguments. Handling of any matching existing process will be in accordance with the given ProcStartPolicy. The search pattern will be used to search through the cmdline args of existing processes to find any matching existing process. Therefore, it should be a regex pattern that can uniquely identify the process (e.g., --id=1)
type ProcStartPolicy ¶
type ProcStartPolicy int