MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / deployStatusCodeToString

Function deployStatusCodeToString

component/repo.go:1986–2031  ·  view source on GitHub ↗
(code int)

Source from the content-addressed store, hash-verified

1984}
1985
1986func deployStatusCodeToString(code int) string {
1987 // DeployBuildPending = 10
1988 // DeployBuildInProgress = 11
1989 // DeployBuildFailed = 12
1990 // DeployBuildSucceed = 13
1991 // DeployBuildSkip = 14
1992 //
1993 // DeployPrepareToRun = 20
1994 // DeployStartUp = 21
1995 // DeployRunning = 22
1996 // DeployRunTimeError = 23
1997 // DeployStopped = 26
1998 // DeployRunDeleted = 27 // end user trigger delete action for deploy
1999
2000 // simplified status for frontend show
2001 var txt string
2002 switch code {
2003 case 10:
2004 txt = SpaceStatusStopped
2005 case 11:
2006 txt = SpaceStatusBuilding
2007 case 12:
2008 txt = SpaceStatusBuildFailed
2009 case 13:
2010 txt = SpaceStatusDeploying
2011 case 20:
2012 txt = SpaceStatusDeploying
2013 case 21:
2014 txt = SpaceStatusDeployFailed
2015 case 22:
2016 txt = SpaceStatusDeploying
2017 case 23:
2018 txt = SpaceStatusRunning
2019 case 24:
2020 txt = SpaceStatusRuntimeError
2021 case 25:
2022 txt = SpaceStatusSleeping
2023 case 26:
2024 txt = SpaceStatusStopped
2025 case 27:
2026 txt = RepoStatusDeleted
2027 default:
2028 txt = SpaceStatusStopped
2029 }
2030 return txt
2031}
2032
2033func (c *RepoComponent) DeployInstanceLogs(ctx context.Context, logReq types.DeployActReq) (*deploy.MultiLogReader, error) {
2034 var (

Callers 8

statusMethod · 0.85
GetServerlessMethod · 0.85
ListDeployMethod · 0.85
DeployDetailMethod · 0.85
DeployStatusMethod · 0.85
ListDeploysMethod · 0.85
ListInstancesMethod · 0.85
ListServerlessMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected