commons

package
v0.6.25 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InterProcessCommunicationFinishSuccess is the message that parent process receives when child process is executed successfully
	InterProcessCommunicationFinishSuccess string = "<<COMMUNICATION_CLOSE_SUCCESS>>"
	// InterProcessCommunicationFinishError is the message that parent process receives when child process fails to run
	InterProcessCommunicationFinishError string = "<<COMMUNICATION_CLOSE_ERROR>>"
)
View Source
const (
	ChildProcessArgument = "child_process"
)

Variables

This section is empty.

Functions

func ChildProcessReadConfigViaSTDIN

func ChildProcessReadConfigViaSTDIN() (*commons.Config, io.WriteCloser, error)

func ParentProcessSendConfigViaSTDIN

func ParentProcessSendConfigViaSTDIN(config *commons.Config, stdin io.WriteCloser, stdout io.ReadCloser) error

func PrintHelp

func PrintHelp(command *cobra.Command) error

func PrintVersion

func PrintVersion(command *cobra.Command) error

func ProcessCommonFlags

func ProcessCommonFlags(command *cobra.Command) (*commons.Config, io.WriteCloser, bool, error)

func ReportChildProcessError

func ReportChildProcessError()

func ReportChildProcessStartSuccessfully

func ReportChildProcessStartSuccessfully()

func RunChildProcess

func RunChildProcess(serverExec string) (io.WriteCloser, io.ReadCloser, error)

func SetCommonFlags

func SetCommonFlags(command *cobra.Command)

func SetNilLogWriter

func SetNilLogWriter()

Types

type NilWriter

type NilWriter struct{}

NilWriter drains output

func (*NilWriter) Close added in v0.6.9

func (w *NilWriter) Close() (err error)

func (*NilWriter) Write

func (w *NilWriter) Write(p []byte) (n int, err error)

Write does nothing

Jump to

Keyboard shortcuts

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