sfcs/server/types.go

36 lines
500 B
Go
Raw Permalink Normal View History

2025-01-29 23:20:44 +01:00
package server
import (
"time"
"github.com/gorilla/websocket"
)
type Agent struct {
Name string
Reg time.Time
Cores int
Cpu []int
Mem_max float64
Mem_usg []float64
TaskId int
conn *websocket.Conn
}
type Task struct {
Puzzle [9]string
Solutions [][]string
}
2025-01-29 23:20:44 +01:00
type Server struct {
ListenAddress string
ListenPort int
Agents map[string]*Agent
Tasks []*Task
}
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
2025-01-29 23:20:44 +01:00
}