Documentation ¶
Index ¶
- Constants
- Variables
- func BatchKillExistBinaries(binaryPaths []string)
- func Build(binaries []string)
- func CheckAndReportBinariesStatus()
- func CheckBinariesRunning() error
- func CheckBinariesStop() error
- func CheckProcessInMap(processMap map[string]int, processPath string) bool
- func CheckProcessNames(processPath string, expectedCount int, processMap map[string]int) error
- func CompileForPlatform(platform string, compileBinaries []string)
- func DetectPlatform() string
- func FetchProcesses() (map[string]int, error)
- func FindPIDsByBinaryPath() (map[string][]int, error)
- func GetBinFullPath(binName string) string
- func GetToolFullPath(toolName string) string
- func InitForSSC()
- func KillExistBinaries()
- func KillExistBinary(binaryPath string)
- func OsArch() string
- func PrintBinaryPorts(binaryPath string, pidMap map[string][]int)
- func PrintBlue(message string)
- func PrintBlueTwoLine(message string)
- func PrintGreen(message string)
- func PrintGreenNoTimeStamp(message string)
- func PrintGreenToStdOut(a ...interface{}) (n int, err error)
- func PrintGreenTwoLine(message string)
- func PrintListenedPortsByBinaries() error
- func PrintRed(message string)
- func PrintRedNoTimeStamp(message string)
- func PrintRedToStdErr(a ...interface{}) (n int, err error)
- func PrintYellow(message string)
- func Protocol() error
- func RemoveOmitemptyFromFile(filePath string) error
- func StartBinaries() error
- func StartTools() error
- func StartToolsAndServices()
- func StopAndCheckBinaries()
- func StopBinaries()
- type Config
Constants ¶
const ( ColorBlue = "\033[0;34m" ColorGreen = "\033[0;32m" ColorRed = "\033[0;31m" ColorReset = "\033[0m" )
const ( MountConfigFilePath = "CONFIG_PATH" DeploymentType = "DEPLOYMENT_TYPE" KUBERNETES = "kubernetes" )
Variables ¶
var ( OpenIMRoot string OpenIMOutputConfig string OpenIMK8sConfig string OpenIMOutput string OpenIMOutputTools string OpenIMOutputTmp string OpenIMOutputLogs string OpenIMOutputBin string OpenIMOutputBinPath string OpenIMOutputBinToolPath string OpenIMInitErrLogFile string OpenIMInitLogFile string OpenIMOutputHostBin string OpenIMOutputHostBinTools string )
var (
MaxFileDescriptors int
)
Functions ¶
func BatchKillExistBinaries ¶ added in v0.0.8
func BatchKillExistBinaries(binaryPaths []string)
func CheckAndReportBinariesStatus ¶
func CheckAndReportBinariesStatus()
CheckAndReportBinariesStatus checks the running status of all binary files and reports it.
func CheckBinariesRunning ¶
func CheckBinariesRunning() error
CheckBinariesRunning checks if all binary files are running as expected and returns any errors encountered.
func CheckBinariesStop ¶
func CheckBinariesStop() error
CheckBinariesStop checks if all binary files have stopped and returns an error if there are any binaries still running.
func CheckProcessInMap ¶ added in v0.0.9
func CheckProcessNames ¶
CheckProcessNames checks if the number of processes running that match the specified path equals the expected count.
func CompileForPlatform ¶
CompileForPlatform Main compile function
func DetectPlatform ¶
func DetectPlatform() string
DetectPlatform detects the operating system and architecture.
func FetchProcesses ¶ added in v0.0.9
FetchProcesses returns a map of executable paths to their running count.
func FindPIDsByBinaryPath ¶
FindPIDsByBinaryPath returns a map of executable paths to slices of PIDs.
func GetBinFullPath ¶
GetBinFullPath constructs and returns the full path for the given binary name.
func GetToolFullPath ¶
GetToolFullPath constructs and returns the full path for the given tool name.
func InitForSSC ¶
func InitForSSC()
func KillExistBinaries ¶
func KillExistBinaries()
KillExistBinaries iterates over all binary files and kills their corresponding processes.
func KillExistBinary ¶
func KillExistBinary(binaryPath string)
KillExistBinary kills all processes matching the given binary file path.
func PrintBinaryPorts ¶
func PrintBlueTwoLine ¶
func PrintBlueTwoLine(message string)
func PrintGreen ¶
func PrintGreen(message string)
func PrintGreenNoTimeStamp ¶
func PrintGreenNoTimeStamp(message string)
func PrintGreenToStdOut ¶
func PrintGreenTwoLine ¶
func PrintGreenTwoLine(message string)
func PrintListenedPortsByBinaries ¶
func PrintListenedPortsByBinaries() error
PrintListenedPortsByBinaries iterates over all binary files and prints the ports they are listening on.
func PrintRedNoTimeStamp ¶
func PrintRedNoTimeStamp(message string)
func PrintRedToStdErr ¶
func PrintYellow ¶ added in v0.0.4
func PrintYellow(message string)
func RemoveOmitemptyFromFile ¶ added in v0.0.14
func StartToolsAndServices ¶
func StartToolsAndServices()
StartToolsAndServices starts the process for tools and services.
func StopAndCheckBinaries ¶
func StopAndCheckBinaries()
StopAndCheckBinaries stops all binary processes and checks if they have all stopped.
func StopBinaries ¶
func StopBinaries()
StopBinaries iterates over all binary files and terminates their corresponding processes.