Documentation ¶
Index ¶
- type BaseEnvironment
- func (e *BaseEnvironment) AddListener(ws *websocket.Conn)
- func (e *BaseEnvironment) Delete() (err error)
- func (e *BaseEnvironment) DisplayToConsole(msg string, data ...interface{})
- func (e *BaseEnvironment) Execute(cmd string, args []string, callback func(graceful bool)) (stdOut []byte, err error)
- func (e *BaseEnvironment) ExecuteAsync(cmd string, args []string, callback func(graceful bool)) (err error)
- func (e *BaseEnvironment) GetConsole() (console []string, epoch int64)
- func (e *BaseEnvironment) GetConsoleFrom(time int64) (console []string, epoch int64)
- func (e *BaseEnvironment) GetRootDirectory() string
- func (e *BaseEnvironment) Update() error
- func (e *BaseEnvironment) WaitForMainProcess() (err error)
- type Environment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseEnvironment ¶ added in v1.2.0
type BaseEnvironment struct { Environment RootDirectory string `json:"-"` ConsoleBuffer cache.Cache `json:"-"` WSManager utils.WebSocketManager `json:"-"` Type string `json:"type"` // contains filtered or unexported fields }
func (*BaseEnvironment) AddListener ¶ added in v1.2.0
func (e *BaseEnvironment) AddListener(ws *websocket.Conn)
func (*BaseEnvironment) Delete ¶ added in v1.2.0
func (e *BaseEnvironment) Delete() (err error)
func (*BaseEnvironment) DisplayToConsole ¶ added in v1.2.0
func (e *BaseEnvironment) DisplayToConsole(msg string, data ...interface{})
func (*BaseEnvironment) ExecuteAsync ¶ added in v1.2.0
func (e *BaseEnvironment) ExecuteAsync(cmd string, args []string, callback func(graceful bool)) (err error)
func (*BaseEnvironment) GetConsole ¶ added in v1.2.0
func (e *BaseEnvironment) GetConsole() (console []string, epoch int64)
func (*BaseEnvironment) GetConsoleFrom ¶ added in v1.2.0
func (e *BaseEnvironment) GetConsoleFrom(time int64) (console []string, epoch int64)
func (*BaseEnvironment) GetRootDirectory ¶ added in v1.2.0
func (e *BaseEnvironment) GetRootDirectory() string
func (*BaseEnvironment) Update ¶ added in v1.2.0
func (e *BaseEnvironment) Update() error
func (*BaseEnvironment) WaitForMainProcess ¶ added in v1.2.0
func (e *BaseEnvironment) WaitForMainProcess() (err error)
type Environment ¶
type Environment interface { //Executes a command within the environment. Execute(cmd string, args []string, callback func(graceful bool)) (stdOut []byte, err error) //Executes a command within the environment and immediately return ExecuteAsync(cmd string, args []string, callback func(graceful bool)) (err error) //Sends a string to the StdIn of the main program process ExecuteInMainProcess(cmd string) (err error) //Kills the main process, but leaves the environment running. Kill() (err error) //Creates the environment setting needed to run programs. Create() (err error) //Deletes the environment. Delete() (err error) Update() (err error) IsRunning() (isRunning bool, err error) WaitForMainProcess() (err error) WaitForMainProcessFor(timeout int) (err error) GetRootDirectory() string GetConsole() (console []string, epoch int64) GetConsoleFrom(time int64) (console []string, epoch int64) AddListener(ws *websocket.Conn) GetStats() (map[string]interface{}, error) DisplayToConsole(msg string, data ...interface{}) }
func LoadEnvironment ¶
func LoadEnvironment(environmentType, folder, id string, environmentSection map[string]interface{}) Environment
Click to show internal directories.
Click to hide internal directories.