dstartcore

package
v0.0.0-...-1c5bb61 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileNotExist = errors.New("file not exist")

Functions

func ProcessDstartFromConfigFile

func ProcessDstartFromConfigFile(configFilePath string)

func StartService

func StartService(service Service, globalEnv map[string]string) error

func VerifyService

func VerifyService(service Service) error

Types

type Config

type Config struct {
	Global Global `toml:"global"`

	Services map[string]Service `toml:"service"`
}

type Global

type Global struct {
	IncludeConfigFileExp string            `toml:"IncludeConfigFileExp"`
	Envs                 map[string]string `toml:"envs"`
}

type Service

type Service struct {
	Description string `toml:"Description"`
	ExecCommand string `toml:"ExecCommand"`

	Username  string `toml:"Username"`
	Uid       string `toml:"Uid"`
	GroupName string `toml:"Groupname"`
	GroupId   string `toml:"GroupId"`

	WorkingDirectory string `toml:"WorkingDirectory"`

	InputFile                   string `toml:"InputFile"`
	OutputFile                  string `toml:"OutputFile"`
	OutputFileAppend            bool   `toml:"OutputFileAppend"`
	ErrorOutputFile             string `toml:"ErrorOutputFile"`
	ErrorOutputFileAppend       bool   `toml:"ErrorOutputFileAppend"`
	RedirectErrorOutputToOutput bool   `toml:"RedirectErrorOutputToOutput"`

	Envs map[string]string `toml:"Envs"`
}

Jump to

Keyboard shortcuts

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