Documentation
¶
Index ¶
- Constants
- Variables
- func Check(app string) bool
- func FirstLoad()
- func GetAllAppName() ([]string, error)
- func InitAPPManager()
- func LoadManagerCf() error
- func LoadToMap(appName string) error
- func NewApp(appName string) error
- func NewAppScript(appName string) error
- func Persist()
- func ReStart(app string) (bool, error)
- func ReloadManagerMap() error
- func SavePort(app string, port []int)
- func SaveRuntimeData(app App)
- func SaveToDB()
- func SaveToFile(cf *App, appName string) error
- func Start(app string) (bool, error)
- func StartAll() ([]string, error)
- func Status(app string) (string, error)
- func StatusAll() ([]string, error)
- func Stop(app string) (bool, error)
- func StopAll() ([]string, error)
- func SyncAll() error
- func SyncApp(app string) (bool, error)
- type App
- func (app *App) BackUp() (bool, error)
- func (app *App) Check() (bool, error)
- func (app *App) CheckAppReleaseStatus() bool
- func (app *App) ClearPorts()
- func (app *App) ClonePorts()
- func (app *App) DepCheck() bool
- func (app *App) Dump() (bool, error)
- func (app *App) ForceKill() (bool, error)
- func (app *App) Info() interface{}
- func (app *App) PostTodo() *App
- func (app *App) ReStart() (bool, error)
- func (app *App) Reload() (bool, error)
- func (app *App) Start() (bool, error)
- func (app *App) Stop() (bool, error)
- func (app *App) Sync() (bool, error)
- func (app *App) SyncDB() (bool, error)
- func (app *App) ToJSON() string
- func (app *App) Validate() bool
- type DaoAPP
Constants ¶
View Source
const ( APPConfigsRoot = "conf/app" APPScriptsRoot = "conf/manager" // 当前独立与zeus ConfigSuffix = ".pig" APPStart = "start" APPStop = "stop" APPExit = "exit" APPRestart = "restart" APPKilled = "killed" APPRunning = "running" )
View Source
const ( APPStatusError APPStatusStart APPStatusStop APPStatusExit APPStatusRestart APPStatusKilled APPStatusRunning )
View Source
const ( TypeService = "Service" // 服务 TypeWebFront = "FrontEnd" // 前端 TypeMiddleWare = "MiddleWare" // 中间件 TypeDataStore = "DataStore" // 数据层 )
app的默认类型
View Source
const ( Published = "published" // 已发布 Testing = "testing" // 测试中 Pending = "pending" // 待发布 )
app的发布状态
View Source
const ( ConfNginx = "nginx" ConfGunicorn = "gunicorn" )
配置文件类型
View Source
const APPManagerPrefix = "[APP Manager]"
View Source
const (
APPNotExist = "app not exist"
)
View Source
const APPStatusOK = 0
View Source
const AppUnknown = 555
View Source
const CollectName = "microservice"
View Source
const PersistFile = "apolloServices.bson"
Variables ¶
View Source
var APPManager = appManager{ APPManagerMap: sync.Map{}, APPUsingPorts: map[int]struct{}{}, }
View Source
var StatusMap = map[int]string{ APPStatusOK: "running", APPStatusError: "stopped", APPStatusExit: "stopped", AppUnknown: "unknown", }
StatusMap 返回状态使用的状态表
Functions ¶
func GetAllAppName ¶ added in v1.1.3
func NewAppScript ¶
NewAppScript 新增app 命令目录 默认只创建start stop check
func ReloadManagerMap ¶ added in v1.0.7
func ReloadManagerMap() error
ReloadManagerMap 运行时刷新数据 只做增量更新 数据的更新由AppSync任务完成
func SaveRuntimeData ¶
func SaveRuntimeData(app App)
Types ¶
type App ¶
type App struct {
Meta octopus_meta.App `json:"meta" bson:"meta"`
}
App model for app
func (*App) CheckAppReleaseStatus ¶
CheckAppReleaseStatus 检查app发布状态 未发布时不进行操作
Click to show internal directories.
Click to hide internal directories.