process

package
v0.0.0-...-cf3d621 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProcess

func GetProcess(c echo.Context) error

func GetProcessList

func GetProcessList() map[string]*Process

GetProcessList returns all active processes as a map

func GetProcessPayload

func GetProcessPayload(c echo.Context) error

func GetProcesses

func GetProcesses(c echo.Context) error

func InitializeRepository

func InitializeRepository()

InitializeRepository inicializa el repository de procesos

func KillWID

func KillWID(c echo.Context) error

func Ps

func Ps() string

func SetProcessID

func SetProcessID(wid string, p *Process)

func WKill

func WKill(wid string)

func WKillAll

func WKillAll()

Types

type Process

type Process struct {
	UUID           string
	UUIDBoxCurrent string
	State          string
	Type           string
	Payload        interface{}
	Killeable      bool
	Callback       chan string     `json:"-"`
	FlagExit       int             `json:"-"`
	Ws             *websocket.Conn `json:"-"`
	// contains filtered or unexported fields
}

func CreateProcess

func CreateProcess(wid string) *Process

func CreateProcessWithCallback

func CreateProcessWithCallback(wid string) *Process

func GetProcessID

func GetProcessID(wid string) (*Process, bool)

func (*Process) Close

func (p *Process) Close()

func (*Process) GetFlagExit

func (p *Process) GetFlagExit() int

GetFlagExit devuelve el valor de FlagExit de forma thread-safe

func (*Process) Kill

func (p *Process) Kill()

func (*Process) SendCallback

func (p *Process) SendCallback(data string)

func (*Process) SetFlagExit

func (p *Process) SetFlagExit(value int)

SetFlagExit establece el valor de FlagExit de forma thread-safe

type ProcessRepository

type ProcessRepository interface {
	Get(wid string) (*Process, bool)
	GetAll() map[string]*Process
	Set(wid string, process *Process)
	Delete(wid string)
	Exists(wid string) bool
	GetAllKeys() []string
	Clear()
}

ProcessRepository maneja el acceso thread-safe a los procesos

func GetRepository

func GetRepository() ProcessRepository

GetRepository retorna el repository actual

func NewProcessRepository

func NewProcessRepository() ProcessRepository

NewProcessRepository crea una nueva instancia del repository

Jump to

Keyboard shortcuts

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