Documentation
¶
Overview ¶
Package deploy defines core deployment types, handlers, and orchestration interfaces used by the daemon for managing application deployments. High-level deployment workflows, lifecycle management, and integration logic are implemented in the internal/deploy package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeployRequest ¶
type DeployRequest struct {
Name string `json:"name" validate:"required"`
Description string `json:"description,omitempty"`
UserId string `json:"user_id" validate:"required"`
Source string `json:"source" validate:"required,oneof=remote image"`
Runtime store.RuntimeObj `json:"runtime" validate:"required"`
Version string `json:"version,omitempty" validate:"omitempty"`
RunCmd string `json:"run_cmd,omitempty" validate:"required_unless=Runtime static docker k3s,omitempty"`
BuildCmd string `json:"build_cmd,omitempty" validate:"omitempty"`
Port int `json:"port,omitempty" validate:"required_unless=Runtime static docker k3s,omitempty,number"`
WorkingDir string `json:"working_dir,omitempty" validate:"omitempty"`
StaticDir string `json:"static_dir,omitempty" validate:"omitempty"`
Image string `json:"image,omitempty" validate:"omitempty"`
EnvVars map[string]string `json:"env_vars,omitempty" validate:"omitempty"`
Secrets map[string]string `json:"secrets,omitempty" validate:"omitempty"`
Remote store.RemoteObj `json:"remote,omitempty" validate:"omitempty"`
Domain string `json:"domain,omitempty" validate:"omitempty"`
DNSProvider string `json:"dns_provider,omitempty" validate:"omitempty"`
}
type DeployResponse ¶
type Deployer ¶
type Deployer struct {
// contains filtered or unexported fields
}
func NewDeployer ¶
func NewDeployer(c *shared.Config, l *shared.Logger, s store.DeploymentStore, a HandleDeployment) *Deployer
type DeploymentHandler ¶
type DeploymentHandler struct {
// contains filtered or unexported fields
}
func NewDeploymentHandler ¶
func NewDeploymentHandler(deployer *Deployer, logger *shared.Logger) *DeploymentHandler
func (*DeploymentHandler) CreateDeployment ¶
func (h *DeploymentHandler) CreateDeployment(w http.ResponseWriter, r *http.Request)
func (*DeploymentHandler) ListDeployments ¶
func (h *DeploymentHandler) ListDeployments(w http.ResponseWriter, r *http.Request)
type HandleDeployment ¶
type HandleDeployment interface {
Deploy(ctx context.Context, req *DeployRequest) (*DeployResponse, error)
GetDeployment(ctx context.Context, id string) (*store.Deployment, error)
ListDeployments(ctx context.Context, id string, limit, offset int) ([]*store.Deployment, error)
UpdateDeploymentStatus(ctx context.Context, id string, status store.Status) error
}
type ListDeploymentsResponse ¶
type ListDeploymentsResponse struct {
Deployments []*store.Deployment `json:"deployments"`
Total int `json:"total"`
}
Click to show internal directories.
Click to hide internal directories.