feat: add supervisor prototype with embedded frontend
This commit is contained in:
25
internal/domain/session.go
Normal file
25
internal/domain/session.go
Normal file
@ -0,0 +1,25 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type SessionStatus string
|
||||
|
||||
const (
|
||||
SessionStatusCreated SessionStatus = "created"
|
||||
SessionStatusRunning SessionStatus = "running"
|
||||
SessionStatusStopped SessionStatus = "stopped"
|
||||
SessionStatusExited SessionStatus = "exited"
|
||||
SessionStatusError SessionStatus = "error"
|
||||
)
|
||||
|
||||
type Session struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
AgentID string `json:"agentId"`
|
||||
Command string `json:"command"`
|
||||
Status SessionStatus `json:"status"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
StartedAt *time.Time `json:"startedAt,omitempty"`
|
||||
ExitedAt *time.Time `json:"exitedAt,omitempty"`
|
||||
ExitCode *int `json:"exitCode,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user