Documentation ¶
Index ¶
- Variables
- type Config
- type Program
- type ProgramExt
- type Scanner
- func (s *Scanner) C() <-chan *ProgramExt
- func (s *Scanner) GetStatus(appName string) ([]structs.AgentConfigStatus, error)
- func (s *Scanner) ListPrograms() (tasks map[string]*ProgramExt, err error)
- func (s *Scanner) ProcessStatus() (processList []structs.ProcessStatus, err error)
- func (s *Scanner) Show() map[string]interface{}
- func (s *Scanner) Start() error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSupervisorDir = "/etc/supervisor/conf.d"
DefaultSupervisorDir ...
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Dir string `json:"dir"` // 配置中心supervisor具体配置路径 Enable bool `json:"enable"` // 是否开启开插件 }
Config ...
type Program ¶
type Program struct { Directory string `ini:"directory"` Environment string `ini:"environment"` Command string `ini:"command"` User string `ini:"user"` Autostart bool `ini:"autostart"` Autorestart bool `ini:"autorestart"` Startsecs int `ini:"startsecs"` StdoutLogfile string `ini:"stdout_logfile"` StdoutLogfileMaxbytes string `ini:"stdout_logfile_maxbytes"` StdoutLogfileBackups int `ini:"stdout_logfile_backups"` StdoutCaptureMaxbytes string `ini:"stdout_capture_maxbytes"` StderrLogfile string `ini:"stderr_logfile"` StderrLogfileMaxbytes string `ini:"stderr_logfile_maxbytes"` StderrLogfileBackups int `ini:"stderr_logfile_backups"` Stopsignal string `ini:"stopsignal"` Config string `ini:"-"` }
Program ...
type ProgramExt ¶
type ProgramExt struct { Manager string `json:"manager" toml:"manager"` // systemd|supervisor Status string `json:"status" toml:"status"` *Program `json:"program" toml:"program"` Content string `json:"content" toml:"content"` FileName string `json:"file_name" toml:"file_name"` FilePath string `json:"file_path" toml:"file_path"` AppName string `json:"app_name" toml:"app_name"` }
ProgramExt ...
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner supervisor sacnner
func (*Scanner) GetStatus ¶
func (s *Scanner) GetStatus(appName string) ([]structs.AgentConfigStatus, error)
GetStatus ...
func (*Scanner) ListPrograms ¶
func (s *Scanner) ListPrograms() (tasks map[string]*ProgramExt, err error)
ListPrograms list the supervisor list
func (*Scanner) ProcessStatus ¶
func (s *Scanner) ProcessStatus() (processList []structs.ProcessStatus, err error)
ProcessStatus ...
Click to show internal directories.
Click to hide internal directories.