Documentation
¶
Index ¶
- func GetProcess(c echo.Context) error
- func GetProcessList() map[string]*Process
- func GetProcessPayload(c echo.Context) error
- func GetProcesses(c echo.Context) error
- func InitializeRepository()
- func KillWID(c echo.Context) error
- func Ps() string
- func SetProcessID(wid string, p *Process)
- func WKill(wid string)
- func WKillAll()
- type Process
- type ProcessRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProcess ¶
func GetProcessList ¶
GetProcessList returns all active processes as a map
func GetProcessPayload ¶
func GetProcesses ¶
func InitializeRepository ¶
func InitializeRepository()
InitializeRepository inicializa el repository de procesos
func SetProcessID ¶
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 GetProcessID ¶
func (*Process) GetFlagExit ¶
GetFlagExit devuelve el valor de FlagExit de forma thread-safe
func (*Process) SendCallback ¶
func (*Process) SetFlagExit ¶
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
Click to show internal directories.
Click to hide internal directories.