Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateWorkerRequest ¶
type CreateWorkerRequest struct {
ID string `json:"id"`
Name string `json:"name"`
Labels map[string]string `json:"labels"`
Annotations map[string]string `json:"annotations"`
EnvType string `json:"env_type"`
Image string `json:"image"`
Command []string `json:"command"`
Args []string `json:"args"`
Env map[string]string `json:"env"`
WorkingDir string `json:"working_dir"`
}
type GetWorkerInfoRequest ¶
type GetWorkerInfoRequest struct {
WorkerID string `json:"worker_id" binding:"required"`
}
type ListWorkersResponse ¶
type ListWorkersResponse struct {
Workers []WorkerInfo `json:"workers"`
Total int `json:"total"`
}
type ShutdownWorkerRequest ¶
type ShutdownWorkerRequest struct {
WorkerID string `json:"worker_id" binding:"required"`
}
type WorkerConnection ¶
type WorkerConnection struct {
ID string
Conn *websocket.Conn
Send chan *wsproto.WSMessage
Status string
Registered time.Time
LastSeen time.Time
// contains filtered or unexported fields
}
func (*WorkerConnection) SendWSMessage ¶
func (wc *WorkerConnection) SendWSMessage(msg *wsproto.WSMessage) error
type WorkerInfo ¶
type WorkerManager ¶
type WorkerManager struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(scheduler worker.WorkerScheduler) *WorkerManager
func (*WorkerManager) RegisterRoutes ¶
func (s *WorkerManager) RegisterRoutes(r gin.IRouter)
Click to show internal directories.
Click to hide internal directories.