Documentation
¶
Overview ¶
Package app contains types to run the app.
Index ¶
- Constants
- func DefaultProjectCachePathGetter(workspaceSlug, repo, branch string) string
- func DefaultProjectPathGetter(workspaceSlug, repo, branch string) string
- type App
- type Opt
- func OptCheckProjectsInterval(interval time.Duration) Opt
- func OptConfigFilenames(filenames ...string) Opt
- func OptDisableSignalHandling() Opt
- func OptGracefulShutdownTimeout(timeout time.Duration) Opt
- func OptJobConcurrency(concurrency int) Opt
- func OptListenAddress(address string) Opt
- func OptLogCap(cap int) Opt
- func OptLogLevel(level models.LogLevel) Opt
- func OptProjectCachePathGetter(getter jobs.ProjectCachePathGetter) Opt
- func OptProjectPathGetter(getter models.ProjectPathGetter) Opt
- func OptUI(fs http.FileSystem) Opt
Constants ¶
const ( // DefaultConfigFilename is the default filename of the config file. DefaultConfigFilename = "groundcontrol.yml" // DefaultListenAddress is the default listen address. DefaultListenAddress = ":3333" // DefaultJobConcurrency is the default concurrency of the job manager. DefaultJobConcurrency = 2 // DefaultLogLevel is the default log level. DefaultLogLevel = models.LogLevelInfo // DefaultLogCap is the default capacity of the logger. DefaultLogCap = 10000 // DefaultCheckProjectsInterval is the default check projects interval. DefaultCheckProjectsInterval = time.Minute // DefaultGracefulShutdownTimeout is the default graceful shutdown timeout. DefaultGracefulShutdownTimeout = 20 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func DefaultProjectCachePathGetter ¶
DefaultProjectCachePathGetter is the default ProjectCachePathGetter.
func DefaultProjectPathGetter ¶
DefaultProjectPathGetter is the default ProjectPathGetter.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App contains data about the app.
type Opt ¶
type Opt func(*App)
Opt represents an app option.
func OptCheckProjectsInterval ¶
OptCheckProjectsInterval sets the time to wait between periodic jobs used to check the state of projects.
func OptConfigFilenames ¶
OptConfigFilenames adds config files. This option can be added multiple times.
func OptDisableSignalHandling ¶
func OptDisableSignalHandling() Opt
OptDisableSignalHandling tells the app not to listen to exit signals.
func OptGracefulShutdownTimeout ¶
OptGracefulShutdownTimeout sets the maximum duration for a graceful shutdown.
func OptJobConcurrency ¶
OptJobConcurrency sets the concurrency of the job manager.
func OptListenAddress ¶
OptListenAddress sets the listen address.
func OptLogLevel ¶
OptLogLevel sets the minimum level for log messages.
func OptProjectCachePathGetter ¶
func OptProjectCachePathGetter(getter jobs.ProjectCachePathGetter) Opt
OptProjectCachePathGetter sets the function to resolve the path of a project cache.
func OptProjectPathGetter ¶
func OptProjectPathGetter(getter models.ProjectPathGetter) Opt
OptProjectPathGetter sets the function to resolve the path of a project.