server

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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 WorkerInfo struct {
	ID         string    `json:"id"`
	Status     string    `json:"status"`
	Registered time.Time `json:"registered"`
	LastSeen   time.Time `json:"last_seen"`
}

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)

Jump to

Keyboard shortcuts

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