api

package
v0.0.0-...-308b42f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatePodRequest

type CreatePodRequest struct {
	Name          string              `json:"name" validate:"required"`
	Namespace     string              `json:"namespace,omitempty"`
	Labels        map[string]string   `json:"labels,omitempty"`
	Annotations   map[string]string   `json:"annotations,omitempty"`
	Containers    []types.Container   `json:"containers" validate:"required,min=1"`
	RestartPolicy types.RestartPolicy `json:"restartPolicy,omitempty"`
}

type CreateServiceRequest

type CreateServiceRequest struct {
	Name            string              `json:"name" validate:"required"`
	Namespace       string              `json:"namespace"`
	Type            types.ServiceType   `json:"type"`
	Selector        map[string]string   `json:"selector" validate:"required"`
	Ports           []types.ServicePort `json:"ports" validate:"required"`
	Labels          map[string]string   `json:"labels"`
	Annotations     map[string]string   `json:"annotations"`
	SessionAffinity string              `json:"sessionAffinity"`
}

type CreateTaskRequest

type CreateTaskRequest struct {
	Name           string                `json:"name" validate:"required"`
	Image          string                `json:"image" validate:"required"`
	Env            map[string]string     `json:"env"`
	LivenessProbe  *types.HealthCheck    `json:"livenessProbe,omitempty"`
	ReadinessProbe *types.HealthCheck    `json:"readinessProbe,omitempty"`
	RestartPolicy  types.RestartPolicy   `json:"restartPolicy,omitempty"`
	Ports          []types.ContainerPort `json:"ports,omitempty"`
}

type RegisterNodeRequest

type RegisterNodeRequest struct {
	Hostname string `json:"hostname" validate:"required"`
	Port     int    `json:"port" validate:"required"`
	CPU      string `json:"cpu" validate:"required"`    // e.g., "2", "500m", "2.5"
	Memory   string `json:"memory" validate:"required"` // e.g., "1Gi", "512Mi", "1073741824"
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	store state.StateStore, sched scheduler.Scheduler, endpointController *services.EndpointController,
) *Server

func (*Server) CreatePod

func (s *Server) CreatePod(c echo.Context) error

func (*Server) CreateService

func (s *Server) CreateService(c echo.Context) error

func (*Server) CreateTask

func (s *Server) CreateTask(c echo.Context) error

func (*Server) DeletePod

func (s *Server) DeletePod(c echo.Context) error

func (*Server) DeleteService

func (s *Server) DeleteService(c echo.Context) error

func (*Server) GetEndpoints

func (s *Server) GetEndpoints(c echo.Context) error

func (*Server) GetPod

func (s *Server) GetPod(c echo.Context) error

func (*Server) GetPodLogs

func (s *Server) GetPodLogs(c echo.Context) error

func (*Server) GetService

func (s *Server) GetService(c echo.Context) error

func (*Server) GetTask

func (s *Server) GetTask(c echo.Context) error

func (*Server) GetTaskLogs

func (s *Server) GetTaskLogs(c echo.Context) error

func (*Server) ListNodes

func (s *Server) ListNodes(c echo.Context) error

func (*Server) ListPods

func (s *Server) ListPods(c echo.Context) error

func (*Server) ListServices

func (s *Server) ListServices(c echo.Context) error

func (*Server) ListTasks

func (s *Server) ListTasks(c echo.Context) error

func (*Server) NodeDeregister

func (s *Server) NodeDeregister(c echo.Context) error

func (*Server) NodeHeartbeat

func (s *Server) NodeHeartbeat(c echo.Context) error

func (*Server) Prune

func (s *Server) Prune(c echo.Context) error

func (*Server) RegisterNode

func (s *Server) RegisterNode(c echo.Context) error

func (*Server) RegisterRoutes

func (s *Server) RegisterRoutes(e *echo.Echo)

func (*Server) StartNodeExpirationChecker

func (s *Server) StartNodeExpirationChecker(ctx context.Context)

func (*Server) StreamPodLogs

func (s *Server) StreamPodLogs(c echo.Context) error

func (*Server) StreamTaskLogs

func (s *Server) StreamTaskLogs(c echo.Context) error

func (*Server) UpdatePodStatus

func (s *Server) UpdatePodStatus(c echo.Context) error

func (*Server) UpdateService

func (s *Server) UpdateService(c echo.Context) error

func (*Server) UpdateTaskStatus

func (s *Server) UpdateTaskStatus(c echo.Context) error

type UpdatePodStatusRequest

type UpdatePodStatusRequest struct {
	Status      types.PodStatus   `json:"status" validate:"required"`
	Containers  []types.Container `json:"containers,omitempty"`
	Message     string            `json:"message,omitempty"`
	Reason      string            `json:"reason,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

type UpdateServiceRequest

type UpdateServiceRequest struct {
	Selector        *map[string]string   `json:"selector"`
	Ports           *[]types.ServicePort `json:"ports"`
	Labels          *map[string]string   `json:"labels"`
	Annotations     *map[string]string   `json:"annotations"`
	SessionAffinity *string              `json:"sessionAffinity"`
}

type UpdateTaskStatusRequest

type UpdateTaskStatusRequest struct {
	Status       types.TaskStatus   `json:"status" validate:"required"`
	ContainerID  string             `json:"containerId"`
	Error        string             `json:"error"`
	HealthStatus types.HealthStatus `json:"healthStatus,omitempty"`
}

Jump to

Keyboard shortcuts

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