MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / buildCreateReqFromBatchInstallReq

Function buildCreateReqFromBatchInstallReq

agent/app/service/agents.go:605–630  ·  view source on GitHub ↗
(req dto.AgentBatchInstallReq)

Source from the content-addressed store, hash-verified

603}
604
605func buildCreateReqFromBatchInstallReq(req dto.AgentBatchInstallReq) dto.AgentCreateReq {
606 return dto.AgentCreateReq{
607 Name: req.Name,
608 Remark: req.Remark,
609 AppVersion: req.AppVersion,
610 WebUIPort: req.WebUIPort,
611 BridgePort: req.BridgePort,
612 AllowedOrigins: req.AllowedOrigins,
613 AgentType: req.AgentType,
614 Model: req.Model,
615 AccountID: req.AccountID,
616 Token: req.Token,
617 TaskID: req.TaskID,
618 Advanced: req.Advanced,
619 ContainerName: req.ContainerName,
620 AllowPort: req.AllowPort,
621 SpecifyIP: req.SpecifyIP,
622 RestartPolicy: req.RestartPolicy,
623 CpuQuota: req.CpuQuota,
624 MemoryLimit: req.MemoryLimit,
625 MemoryUnit: req.MemoryUnit,
626 PullImage: req.PullImage,
627 EditCompose: req.EditCompose,
628 DockerCompose: req.DockerCompose,
629 }
630}
631
632func buildBatchInstallAgentName(agentType string) (string, error) {
633 prefix := strings.ToLower(strings.TrimSpace(agentType))

Callers 1

BatchInstallMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected