Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyComments(content string, comments TomlComments) (modified string, err error)
- func CheckAB[V interface{}](a, b V, check bool) (v V)
- func DecomposeUrl(r *http.Request) (full, scheme, host string, port int)
- func LoadApplications(config *Config) (foundApps map[string]*Application, err error)
- func WriteDefaultConfig(niserokuConfig string) (err error)
- type AppOrigin
- type AppTimeouts
- type Application
- func (a *Application) ApplySettings(envDir string) (err error)
- func (a *Application) Cleanup()
- func (a *Application) Deploy() (err error)
- func (a *Application) GetGpgHome() (home string)
- func (a *Application) GetNextSlug() (slug *Slug)
- func (a *Application) GetSlugWorkerByPid(pid int) (si *SlugWorker)
- func (a *Application) GetThisSlug() (slug *Slug)
- func (a *Application) GetWebWorkers() (count int)
- func (a *Application) GetWorkers(procType string) (count int)
- func (a *Application) ImportGpgSecrets(other *Application) (info map[string][]string, err error)
- func (a *Application) Invoke() (err error)
- func (a *Application) IsDeploying() (locked bool)
- func (a *Application) IsRunningReady() (runningReady bool)
- func (a *Application) Load() (err error)
- func (a *Application) LoadAllSlugs() (err error)
- func (a *Application) LogAccessF(status int, remoteAddr string, r *http.Request, start time.Time)
- func (a *Application) LogError(err error)
- func (a *Application) LogErrorF(format string, argv ...interface{})
- func (a *Application) LogInfoF(format string, argv ...interface{})
- func (a *Application) OsEnviron() (environment env.Env)
- func (a *Application) OsEnvironAptEnjinOnly() (aptEnv env.Env)
- func (a *Application) PrepareGpgSecrets() (err error)
- func (a *Application) PurgeGpgSecrets() (err error)
- func (a *Application) Save(keepCustomComments bool) (err error)
- func (a *Application) SendSignal(sig process.Signal) (err error)
- func (a *Application) SendStopSignal() (err error)
- func (a *Application) SetupRepo() (err error)
- func (a *Application) String() string
- type AptEnjinConfig
- type AptPackageConfig
- type Command
- type Config
- func (c *Config) CallProxyControlCommand(name string, argv ...string) (response string, err error)
- func (c *Config) DialProxyControl() (conn net.Conn, err error)
- func (c *Config) GetAllRunningPorts() (ports map[int]*Application)
- func (c *Config) GetTomlValue(key string) (v interface{})
- func (c *Config) IsGitRepositoryRunning() (running bool)
- func (c *Config) IsReverseProxyRunning() (running bool)
- func (c *Config) MergeConfig(cfg *Config) (err error)
- func (c *Config) PrepareDirectories() (err error)
- func (c *Config) Reload() (err error)
- func (c *Config) RunAsChown(paths ...string) (err error)
- func (c *Config) RunAsGetUidGid() (uid, gid int, err error)
- func (c *Config) Save(keepCustomComments bool) (err error)
- func (c *Config) SetTomlValue(key string, v string) (err error)
- func (c *Config) SignalGitRepository(sig process.Signal) (sent bool)
- func (c *Config) SignalReloadGitRepository() (sent bool)
- func (c *Config) SignalReloadReverseProxy() (sent bool)
- func (c *Config) SignalReverseProxy(sig process.Signal) (sent bool)
- func (c *Config) SignalStopGitRepository() (sent bool)
- func (c *Config) SignalStopReverseProxy() (sent bool)
- func (c *Config) WriteProxyControl(conn net.Conn, name string, argv ...string) (response string, err error)
- type Distribution
- type Distributions
- type GitRepository
- type IncludeSlugsConfig
- type ParsedDebianFile
- type ParsedProxyLimits
- type ParsedProxyLimitsData
- type PathsConfig
- type PortsConfig
- type RateLimit
- type RepreproListEntry
- type ReverseProxy
- func (rp *ReverseProxy) Bind() (err error)
- func (rp *ReverseProxy) GetAppDomain(r *http.Request) (domain string, app *Application, ok bool)
- func (rp *ReverseProxy) HandleSock(conn net.Conn)
- func (rp *ReverseProxy) ProxyHttpHandler() (h http.Handler)
- func (rp *ReverseProxy) Reload() (err error)
- func (rp *ReverseProxy) Serve() (err error)
- func (rp *ReverseProxy) ServeOriginHTTP(app *Application, forwardFor string, w http.ResponseWriter, r *http.Request) (status int, err error)
- func (rp *ReverseProxy) Stop() (err error)
- type RunAsConfig
- type Slug
- func (s *Slug) Cleanup()
- func (s *Slug) ConsumeLivePort() (consumedPort int)
- func (s *Slug) Destroy() (err error)
- func (s *Slug) GetInstanceByPid(pid int) (si *SlugWorker)
- func (s *Slug) GetLivePort() (livePort int)
- func (s *Slug) GetNumWorkers() (num int)
- func (s *Slug) GetOriginRequestTimeout() (timeout time.Duration)
- func (s *Slug) GetReadyIntervalTimeout() (timeout time.Duration)
- func (s *Slug) GetSlugStartupTimeout() (timeout time.Duration)
- func (s *Slug) GetSlugWorkerHashes() (workers []string)
- func (s *Slug) HttpClientDo(port int, req *http.Request) (response *http.Response, err error)
- func (s *Slug) IsReady(hash string) (ready bool)
- func (s *Slug) IsRunning(hash string) (running bool)
- func (s *Slug) IsRunningReady() (running, ready bool)
- func (s *Slug) RefreshWorkers()
- func (s *Slug) SendSignalToAll(sig process.Signal)
- func (s *Slug) StartCommand(name string, argv ...string) (err error)
- func (s *Slug) StartForegroundWorkers(workersReady chan bool) (err error)
- func (s *Slug) StartShell() (err error)
- func (s *Slug) StopAll() (stopped int)
- func (s *Slug) StopWorker(hash string) (stopped bool)
- func (s *Slug) String() string
- type SlugSettings
- type SlugWorker
- func (s *SlugWorker) Cleanup()
- func (s *SlugWorker) Destroy() (err error)
- func (s *SlugWorker) GetBinProcess() (proc *process.Process, err error)
- func (s *SlugWorker) GetPid() (pid int, err error)
- func (s *SlugWorker) IsReady() (ready bool)
- func (s *SlugWorker) IsRunning() (running bool)
- func (s *SlugWorker) IsRunningReady() (running, ready bool)
- func (s *SlugWorker) PrepareStart(port int) (webCmd string, webArgv, environ []string, err error)
- func (s *SlugWorker) ReadProcfile() (procTypes map[string]string, err error)
- func (s *SlugWorker) ReserveUnusedPort() (port int)
- func (s *SlugWorker) RunCommand(name string, argv ...string) (err error)
- func (s *SlugWorker) SendReloadSignal() (sent bool)
- func (s *SlugWorker) SendSignal(sig process.Signal) (sent bool)
- func (s *SlugWorker) SendStopSignal() (sent bool)
- func (s *SlugWorker) Start(port int) (err error)
- func (s *SlugWorker) StartForeground(port int) (err error)
- func (s *SlugWorker) Stop() (stopped bool)
- func (s *SlugWorker) String() (text string)
- func (s *SlugWorker) Unpack() (err error)
- type StatusWatch
- type TimeoutsConfig
- type TomlComment
- type TomlComments
- type Tracking
- type User
- type Users
- type WatchProc
- type WatchSnapshot
- type Watching
- type WatchingByUsage
Constants ¶
View Source
const ( Name = "niseroku" ConfigFileName = Name + ".toml" )
View Source
const (
ProxyControlResponseMaxSize = 1048576
)
Variables ¶
View Source
var ( DefaultGitPort = 2403 DefaultHttpPort = 80 DefaultHttpsPort = 443 DefaultAppEndPort = 4400 DefaultAppStartPort = 4200 DefaultRunAsUser = "www-data" DefaultRunAsGroup = "www-data" DefaultBuildPack = "https://github.com/go-enjin/enjenv-heroku-buildpack.git" DefaultSlugStartupTimeout = 5 * time.Minute DefaultOriginRequestTimeout = time.Minute DefaultReadyIntervalTimeout = time.Second DefaultRateLimitTTL time.Duration = 8760 * time.Hour DefaultRateLimitMax float64 = 150.0 DefaultRateLimitBurst int = 150 DefaultRateLimitMaxDelay time.Duration = 2 * time.Second DefaultRateLimitDelayScale int = 10 )
View Source
var ( RxLogFileName = regexp.MustCompile(`(?:/|^)([^/]+?)\.?(access|info|error|)\.log$`) RxSlugArchiveName = regexp.MustCompile(`(?:/|^)([^/]+?)--([a-f0-9]+)\.zip$`) RxSlugRunningName = regexp.MustCompile(`(?:/|^)([^/]+?)--([a-f0-9]+).([a-f0-9]{10})(\.pid|\.port|)$`) RxSockCommand = regexp.MustCompile(`^\s*([a-z][-.a-z0-9]+?)\s*$`) RxSockCommandWithArgs = regexp.MustCompile(`^\s*([a-z][-.a-z0-9]+?)\s+(.+?)\s*$`) RxTangoTags = regexp.MustCompile(`<.+?>`) )
View Source
var DefaultConfigLocations = []string{ "/etc/niseroku/" + ConfigFileName, "./" + ConfigFileName, }
View Source
var (
DefaultStatusWatchTtyPath = "/dev/tty"
)
View Source
var (
DefaultStatusWatchUpdateFrequency = time.Second
)
View Source
var RxDebFileName = regexp.MustCompile(`^\s*(.+?)_(.+?)_(.+?)\.u?deb\s*$`)
View Source
var RxDscFileName = regexp.MustCompile(`^\s*(.+?)_(.+?)\.dsc\s*$`)
View Source
var RxExportLine = regexp.MustCompile(`^\s*export (.+?)=(['"]?)(.+?)(['"]?)\s*$`)
View Source
var RxRepreproList = regexp.MustCompile(`^\s*([^|]+)\|([^|]+)\|([^|]+):\s*(\S+)\s*(\S+)\s*$`)
Functions ¶
func ApplyComments ¶
func ApplyComments(content string, comments TomlComments) (modified string, err error)
func LoadApplications ¶
func LoadApplications(config *Config) (foundApps map[string]*Application, err error)
func WriteDefaultConfig ¶
Types ¶
type AppOrigin ¶
type AppTimeouts ¶
type AppTimeouts struct { SlugStartup *time.Duration `toml:"slug-startup,omitempty"` ReadyInterval *time.Duration `toml:"ready-interval,omitempty"` OriginRequest *time.Duration `toml:"origin-request,omitempty"` }
func (AppTimeouts) String ¶
func (t AppTimeouts) String() (s string)
type Application ¶
type Application struct { Maintenance bool `toml:"maintenance,omitempty"` Domains []string `toml:"domains,omitempty"` AptPackage *AptPackageConfig `toml:"apt-package,omitempty"` AptEnjin *AptEnjinConfig `toml:"apt-enjin,omitempty"` Workers map[string]int `toml:"workers,omitempty"` Timeouts AppTimeouts `toml:"timeouts,omitempty"` Settings map[string]interface{} `toml:"settings,omitempty"` Origin AppOrigin `toml:"origin"` ThisSlug string `toml:"this-slug,omitempty"` NextSlug string `toml:"next-slug,omitempty"` Name string `toml:"-"` Slugs map[string]*Slug `toml:"-"` Config *Config `toml:"-"` Source string `toml:"-"` GitRepo *git.Repository `toml:"-"` RepoPath string `toml:"-"` ErrorLog string `toml:"-"` AccessLog string `toml:"-"` NoticeLog string `toml:"-"` AptBasePath string `toml:"-"` AptArchivesPath string `toml:"-"` AptRepositoryPath string `toml:"-"` DeployFile string `toml:"-"` sync.RWMutex // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication(source string, config *Config) (app *Application, err error)
func (*Application) ApplySettings ¶
func (a *Application) ApplySettings(envDir string) (err error)
func (*Application) Cleanup ¶
func (a *Application) Cleanup()
func (*Application) Deploy ¶
func (a *Application) Deploy() (err error)
func (*Application) GetGpgHome ¶
func (a *Application) GetGpgHome() (home string)
func (*Application) GetNextSlug ¶
func (a *Application) GetNextSlug() (slug *Slug)
func (*Application) GetSlugWorkerByPid ¶
func (a *Application) GetSlugWorkerByPid(pid int) (si *SlugWorker)
func (*Application) GetThisSlug ¶
func (a *Application) GetThisSlug() (slug *Slug)
func (*Application) GetWebWorkers ¶
func (a *Application) GetWebWorkers() (count int)
func (*Application) GetWorkers ¶
func (a *Application) GetWorkers(procType string) (count int)
func (*Application) ImportGpgSecrets ¶
func (a *Application) ImportGpgSecrets(other *Application) (info map[string][]string, err error)
func (*Application) Invoke ¶
func (a *Application) Invoke() (err error)
func (*Application) IsDeploying ¶
func (a *Application) IsDeploying() (locked bool)
func (*Application) IsRunningReady ¶ added in v0.1.2
func (a *Application) IsRunningReady() (runningReady bool)
func (*Application) Load ¶
func (a *Application) Load() (err error)
func (*Application) LoadAllSlugs ¶
func (a *Application) LoadAllSlugs() (err error)
func (*Application) LogAccessF ¶
func (*Application) LogError ¶
func (a *Application) LogError(err error)
func (*Application) LogErrorF ¶
func (a *Application) LogErrorF(format string, argv ...interface{})
func (*Application) LogInfoF ¶
func (a *Application) LogInfoF(format string, argv ...interface{})
func (*Application) OsEnviron ¶
func (a *Application) OsEnviron() (environment env.Env)
func (*Application) OsEnvironAptEnjinOnly ¶
func (a *Application) OsEnvironAptEnjinOnly() (aptEnv env.Env)
func (*Application) PrepareGpgSecrets ¶
func (a *Application) PrepareGpgSecrets() (err error)
func (*Application) PurgeGpgSecrets ¶
func (a *Application) PurgeGpgSecrets() (err error)
func (*Application) Save ¶
func (a *Application) Save(keepCustomComments bool) (err error)
func (*Application) SendSignal ¶
func (a *Application) SendSignal(sig process.Signal) (err error)
func (*Application) SendStopSignal ¶
func (a *Application) SendStopSignal() (err error)
func (*Application) SetupRepo ¶
func (a *Application) SetupRepo() (err error)
func (*Application) String ¶
func (a *Application) String() string
type AptEnjinConfig ¶
type AptEnjinConfig struct { Enable bool `toml:"enable,omitempty"` SiteKey string `toml:"site-key,omitempty"` SiteName string `toml:"site-name,omitempty"` SiteMail string `toml:"site-mail,omitempty"` SiteMaint string `toml:"site-maint,omitempty"` SiteUrl string `toml:"site-url,omitempty"` GpgKeys map[string][]string `toml:"gpg-keys,omitempty"` Flavours map[string][]Distribution `toml:"flavours,omitempty"` }
type AptPackageConfig ¶
type Command ¶
func (*Command) ExtraCommands ¶
func (c *Command) ExtraCommands(app *cli.App) (commands []*cli.Command)
type Config ¶
type Config struct { BindAddr string `toml:"bind-addr"` EnableSSL bool `toml:"enable-ssl"` AccountEmail string `toml:"account-email"` BuildPack string `toml:"buildpack-path"` LogFile string `toml:"log-file"` KeepSlugs bool `toml:"keep-slugs"` SlugNice int `toml:"slug-nice"` RestartSlugsOnStart bool `toml:"restart-slugs-on-start"` IncludeSlugs IncludeSlugsConfig `toml:"include-slugs"` Timeouts TimeoutsConfig `toml:"timeouts"` ProxyLimit RateLimit `toml:"proxy-limit"` Ports PortsConfig `toml:"ports"` RunAs RunAsConfig `toml:"run-as"` Paths PathsConfig `toml:"paths"` Source string `toml:"-"` NeedRoot bool `toml:"-"` Users []*User `toml:"-"` Applications map[string]*Application `toml:"-"` PortLookup map[int]*Application `toml:"-"` ReservePorts map[int]*Application `toml:"-"` DomainLookup map[string]*Application `toml:"-"` sync.RWMutex // contains filtered or unexported fields }
func LoadConfig ¶
func (*Config) CallProxyControlCommand ¶
func (*Config) GetAllRunningPorts ¶
func (c *Config) GetAllRunningPorts() (ports map[int]*Application)
func (*Config) GetTomlValue ¶
func (*Config) IsGitRepositoryRunning ¶
func (*Config) IsReverseProxyRunning ¶
func (*Config) MergeConfig ¶
func (*Config) PrepareDirectories ¶
func (*Config) RunAsChown ¶
func (*Config) RunAsGetUidGid ¶
func (*Config) SignalGitRepository ¶
func (*Config) SignalReloadGitRepository ¶
func (*Config) SignalReloadReverseProxy ¶
func (*Config) SignalReverseProxy ¶
func (*Config) SignalStopGitRepository ¶
func (*Config) SignalStopReverseProxy ¶
type Distribution ¶
type Distribution struct { Label string `toml:"label,omitempty"` Origin string `toml:"origin,omitempty"` Version string `toml:"version,omitempty"` Description string `toml:"description,omitempty"` Codename string `toml:"codename,omitempty"` Components []string `toml:"components,omitempty"` Architectures []string `toml:"architectures,omitempty"` SignWith string `toml:"sign-with,omitempty"` Contents string `toml:"contents,omitempty"` Tracking string `toml:"tracking,omitempty"` }
func (Distribution) String ¶
func (d Distribution) String() (conf string)
type Distributions ¶
type Distributions []Distribution
func (Distributions) String ¶
func (d Distributions) String() (conf string)
type GitRepository ¶
func NewGitRepository ¶
func NewGitRepository(config *Config) (gr *GitRepository)
func (*GitRepository) Bind ¶
func (gr *GitRepository) Bind() (err error)
func (*GitRepository) Reload ¶
func (gr *GitRepository) Reload() (err error)
func (*GitRepository) Serve ¶
func (gr *GitRepository) Serve() (err error)
func (*GitRepository) Stop ¶
func (gr *GitRepository) Stop() (err error)
type IncludeSlugsConfig ¶
type ParsedDebianFile ¶ added in v0.1.11
type ParsedDebianFile struct { Type string File string Name string Arch string RawVer string Version version.Version }
func ParseDebianDebFilename ¶
func ParseDebianDebFilename(file string) (parsed *ParsedDebianFile, ok bool)
func ParseDebianDscFilename ¶
func ParseDebianDscFilename(file string) (parsed *ParsedDebianFile, ok bool)
type ParsedProxyLimits ¶
type ParsedProxyLimits struct { TotalRequest int64 TotalDelayed int64 Delayed ParsedProxyLimitsData Request ParsedProxyLimitsData }
type ParsedProxyLimitsData ¶
type ParsedProxyLimitsData struct { Apps map[string]int64 Addrs map[string]int64 Hosts map[string]int64 Ports map[string]int64 }
func NewProxyLimitsData ¶
func NewProxyLimitsData() ParsedProxyLimitsData
type PathsConfig ¶
type PathsConfig struct { Etc string `toml:"etc"` Var string `toml:"var"` Tmp string `toml:"tmp"` EtcApps string `toml:"-"` // EtcApps contains all app.toml files EtcUsers string `toml:"-"` // EtcUsers contains all the user.toml files TmpRun string `toml:"-"` // TmpRun is used when running enjenv slugs TmpClone string `toml:"-"` // TmpClone is used during deployment for buildpack clones TmpBuild string `toml:"-"` // TmpBuild is used during deployment for app build directories VarLogs string `toml:"-"` // VarLogs is where slug log files are stored VarRepos string `toml:"-"` // VarRepos is where git repos are stored VarCache string `toml:"-"` // VarCache is where build cache directories as stored VarSlugs string `toml:"-"` // VarSlugs is where slug archives are stored VarAptRoot string `toml:"-"` // VarAptRoot is the path to the apt-repository and apt-archives shared directories VarSettings string `toml:"-"` // VarSettings is where slug env directories are stored AptSecrets string `toml:"-"` // AptSecrets is where gpg signing keys are stored RepoSecrets string `toml:"-"` // RepoSecrets is where ssh-keys are stored RepoPidFile string `toml:"-"` // RepoPidFile is the path for the git-repository service process ID file ProxyPidFile string `toml:"-"` // ProxyPidFile is the path for the reverse-proxy service process ID file ProxySecrets string `toml:"-"` // ProxySecrets is where ssl-certs are stored ProxyRpcSock string `toml:"-"` // ProxyRpcSock is the path for local unix socket file }
type PortsConfig ¶
type RepreproListEntry ¶
type ReverseProxy ¶
func NewReverseProxy ¶
func NewReverseProxy(config *Config) (rp *ReverseProxy)
func (*ReverseProxy) Bind ¶
func (rp *ReverseProxy) Bind() (err error)
func (*ReverseProxy) GetAppDomain ¶
func (rp *ReverseProxy) GetAppDomain(r *http.Request) (domain string, app *Application, ok bool)
func (*ReverseProxy) HandleSock ¶
func (rp *ReverseProxy) HandleSock(conn net.Conn)
func (*ReverseProxy) ProxyHttpHandler ¶
func (rp *ReverseProxy) ProxyHttpHandler() (h http.Handler)
func (*ReverseProxy) Reload ¶
func (rp *ReverseProxy) Reload() (err error)
func (*ReverseProxy) Serve ¶
func (rp *ReverseProxy) Serve() (err error)
func (*ReverseProxy) ServeOriginHTTP ¶
func (rp *ReverseProxy) ServeOriginHTTP(app *Application, forwardFor string, w http.ResponseWriter, r *http.Request) (status int, err error)
func (*ReverseProxy) Stop ¶
func (rp *ReverseProxy) Stop() (err error)
type RunAsConfig ¶
type Slug ¶
type Slug struct { App *Application Name string Commit string Archive string SettingsFile string Settings *SlugSettings Workers map[string]*SlugWorker sync.RWMutex // contains filtered or unexported fields }
func NewSlugFromZip ¶
func NewSlugFromZip(app *Application, archive string) (slug *Slug, err error)
func (*Slug) ConsumeLivePort ¶
func (*Slug) GetInstanceByPid ¶
func (s *Slug) GetInstanceByPid(pid int) (si *SlugWorker)
func (*Slug) GetLivePort ¶
func (*Slug) GetNumWorkers ¶
func (*Slug) GetOriginRequestTimeout ¶
func (*Slug) GetReadyIntervalTimeout ¶
func (*Slug) GetSlugStartupTimeout ¶
func (*Slug) GetSlugWorkerHashes ¶ added in v0.1.2
func (*Slug) HttpClientDo ¶ added in v0.1.17
func (*Slug) IsRunningReady ¶
func (*Slug) RefreshWorkers ¶
func (s *Slug) RefreshWorkers()
func (*Slug) SendSignalToAll ¶
func (*Slug) StartCommand ¶ added in v0.1.8
func (*Slug) StartForegroundWorkers ¶
func (*Slug) StartShell ¶ added in v0.1.8
func (*Slug) StopWorker ¶
type SlugSettings ¶
type SlugSettings struct { Live []string `toml:"live"` Next []string `toml:"next,omitempty"` Path string `toml:"-"` TomlMetaData toml.MetaData `toml:"-"` RunAs RunAsConfig `toml:"-"` }
func NewSlugSettings ¶
func NewSlugSettings(path string, config RunAsConfig) (sw *SlugSettings, err error)
func (*SlugSettings) Reload ¶
func (s *SlugSettings) Reload() (err error)
func (*SlugSettings) Save ¶
func (s *SlugSettings) Save() (err error)
type SlugWorker ¶
type SlugWorker struct { Slug *Slug `toml:"-"` Hash string `toml:"hash"` Name string `toml:"name"` Pid int `toml:"-"` Port int `toml:"port"` RunPath string `toml:"run-path"` PidFile string `toml:"pid-file"` PortFile string `toml:"port-file"` LogFile string `toml:"log-file"` sync.RWMutex }
func NewSlugWorker ¶
func NewSlugWorker(slug *Slug) (si *SlugWorker, err error)
func NewSlugWorkerWithHash ¶
func NewSlugWorkerWithHash(slug *Slug, hash string) (si *SlugWorker, err error)
func (*SlugWorker) Cleanup ¶
func (s *SlugWorker) Cleanup()
func (*SlugWorker) Destroy ¶
func (s *SlugWorker) Destroy() (err error)
func (*SlugWorker) GetBinProcess ¶
func (s *SlugWorker) GetBinProcess() (proc *process.Process, err error)
func (*SlugWorker) GetPid ¶
func (s *SlugWorker) GetPid() (pid int, err error)
func (*SlugWorker) IsReady ¶
func (s *SlugWorker) IsReady() (ready bool)
func (*SlugWorker) IsRunning ¶
func (s *SlugWorker) IsRunning() (running bool)
func (*SlugWorker) IsRunningReady ¶
func (s *SlugWorker) IsRunningReady() (running, ready bool)
func (*SlugWorker) PrepareStart ¶
func (s *SlugWorker) PrepareStart(port int) (webCmd string, webArgv, environ []string, err error)
func (*SlugWorker) ReadProcfile ¶
func (s *SlugWorker) ReadProcfile() (procTypes map[string]string, err error)
func (*SlugWorker) ReserveUnusedPort ¶
func (s *SlugWorker) ReserveUnusedPort() (port int)
func (*SlugWorker) RunCommand ¶ added in v0.1.8
func (s *SlugWorker) RunCommand(name string, argv ...string) (err error)
func (*SlugWorker) SendReloadSignal ¶
func (s *SlugWorker) SendReloadSignal() (sent bool)
func (*SlugWorker) SendSignal ¶
func (s *SlugWorker) SendSignal(sig process.Signal) (sent bool)
func (*SlugWorker) SendStopSignal ¶
func (s *SlugWorker) SendStopSignal() (sent bool)
func (*SlugWorker) Start ¶
func (s *SlugWorker) Start(port int) (err error)
func (*SlugWorker) StartForeground ¶
func (s *SlugWorker) StartForeground(port int) (err error)
func (*SlugWorker) Stop ¶
func (s *SlugWorker) Stop() (stopped bool)
func (*SlugWorker) String ¶
func (s *SlugWorker) String() (text string)
func (*SlugWorker) Unpack ¶
func (s *SlugWorker) Unpack() (err error)
type StatusWatch ¶
func NewStatusWatch ¶
func (*StatusWatch) Run ¶
func (sw *StatusWatch) Run(ctx *cli.Context) (err error)
type TimeoutsConfig ¶
type TomlComment ¶
func (*TomlComment) String ¶
func (t *TomlComment) String() (v string)
type TomlComments ¶
type TomlComments []*TomlComment
func MergeApplicationToml ¶
func MergeApplicationToml(current TomlComments, keepCustomComments bool) (modified TomlComments)
func MergeConfigToml ¶
func MergeConfigToml(current TomlComments, keepCustomComments bool) (modified TomlComments)
func ParseComments ¶
func ParseComments(content string) (tomlComments TomlComments, err error)
func (TomlComments) String ¶
func (t TomlComments) String() (v string)
type Tracking ¶
func NewTracking ¶
func NewTracking() (t *Tracking)
type User ¶
type WatchSnapshot ¶
type Watching ¶
func NewWatching ¶
func (*Watching) Snapshot ¶
func (w *Watching) Snapshot() (s *WatchSnapshot)
type WatchingByUsage ¶
type WatchingByUsage []WatchProc
func (WatchingByUsage) Len ¶
func (a WatchingByUsage) Len() int
func (WatchingByUsage) Less ¶
func (a WatchingByUsage) Less(i, j int) bool
func (WatchingByUsage) Swap ¶
func (a WatchingByUsage) Swap(i, j int)
Source Files ¶
- app-apt-enjin.go
- app-apt-package.go
- app-origin.go
- app-timeouts.go
- application-deploy.go
- application-git-repo.go
- application-invoke.go
- application-process.go
- application-signal.go
- application-toml.go
- application-workers.go
- application.go
- command-app-exec.go
- command-app-git-hooks.go
- command-app-git-post-receive-hook.go
- command-app-git-pre-receive-hook.go
- command-app-promote.go
- command-app-rename.go
- command-app-restart.go
- command-app-run.go
- command-app-start.go
- command-app-stop.go
- command-config-test.go
- command-config.go
- command-deploy-slug.go
- command-fix-fs.go
- command-git-repository.go
- command-reload.go
- command-reverse-proxy.go
- command-status-watch.go
- command-status.go
- command-stop.go
- config-paths.go
- config-ports.go
- config-proxy-control.go
- config-run-as.go
- config-signals.go
- config-toml.go
- config.go
- helpers.go
- niseroku.go
- regexps.go
- server-git-repository.go
- server-reverse-proxy-control.go
- server-reverse-proxy-limiter.go
- server-reverse-proxy-serve.go
- server-reverse-proxy.go
- slug-settings.go
- slug-worker.go
- slug.go
- status-watch.go
- toml-comments.go
- tracking.go
- users.go
- watching-sort.go
- watching.go
Click to show internal directories.
Click to hide internal directories.