Documentation ¶
Overview ¶
Package app contains types to run the app.
Index ¶
- Constants
- Variables
- type App
- type Opt
- func OptCacheDirectory(dir string) Opt
- func OptEnableApolloTracing(enable bool) Opt
- func OptEnableSignalHandling(enable bool) Opt
- func OptGitSourcesDirectory(dir string) Opt
- func OptGracefulShutdownTimeout(timeout time.Duration) Opt
- func OptJobConcurrency(concurrency int) Opt
- func OptKeysFile(filename string) Opt
- func OptListenAddress(address string) Opt
- func OptLogCap(cap int) Opt
- func OptLogLevel(level models.LogLevel) Opt
- func OptOpenBrowser(open bool) Opt
- func OptPeriodicJobsInterval(interval time.Duration) Opt
- func OptPubSubHistoryCap(cap int) Opt
- func OptSourcesFile(filename string) Opt
- func OptUI(fs http.FileSystem) Opt
- func OptWorkspacesDirectory(dir string) Opt
Constants ¶
const ( // 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 // DefaultPubSubHistoryCap is the default capacity of the PubSub history. DefaultPubSubHistoryCap = 1000 // DefaultPeriodicJobsInterval is the default periodic jobs interval. DefaultPeriodicJobsInterval = time.Minute // DefaultGracefulShutdownTimeout is the default graceful shutdown timeout. DefaultGracefulShutdownTimeout = 20 * time.Second // DefaultOpenBrowser is whether to open the user interface in a browser by default. DefaultOpenBrowser = true // DefaultEnableApolloTracing is whether to enable Apollo tracing by default. DefaultEnableApolloTracing = false // DefaultEnableSignalHandling is whether to enable signal handling by default. DefaultEnableSignalHandling = true )
Variables ¶
var ( // DefaultSettingsFile is the default settings file. DefaultSettingsFile = "settings.yml" // DefaultSourcesFile is the default sources file. DefaultSourcesFile = "sources.yml" // DefaultKeysFile is the default keys file. DefaultKeysFile = "keys.yml" // DefaultGitSourcesDirectory is the default Git sources directory. DefaultGitSourcesDirectory = "git-sources" // DefaultWorkspacesDirectory is the default workspace directory. DefaultWorkspacesDirectory = "workspaces" // DefaultCacheDirectory is the default cache directory. DefaultCacheDirectory = "cache" )
Functions ¶
This section is empty.
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 OptCacheDirectory ¶ added in v0.1.5
OptCacheDirectory sets the directory for the cache.
func OptEnableApolloTracing ¶ added in v0.1.5
OptEnableApolloTracing tells the app whether to enable the Apollo tracing middleware.
func OptEnableSignalHandling ¶ added in v0.1.5
OptEnableSignalHandling tells the app whether to handle exit signals.
func OptGitSourcesDirectory ¶ added in v0.2.0
OptGitSourcesDirectory sets the directory for Git sources.
func OptGracefulShutdownTimeout ¶
OptGracefulShutdownTimeout sets the maximum duration for a graceful shutdown.
func OptJobConcurrency ¶
OptJobConcurrency sets the concurrency of the job manager.
func OptKeysFile ¶ added in v0.3.0
OptKeysFile sets the keys file.
func OptListenAddress ¶
OptListenAddress sets the listen address.
func OptLogLevel ¶
OptLogLevel sets the minimum level for log messages.
func OptOpenBrowser ¶ added in v0.1.5
OptOpenBrowser tells the app whether to open the user interface in a browser.
func OptPeriodicJobsInterval ¶ added in v0.2.3
OptPeriodicJobsInterval sets the time to wait between periodic jobs.
func OptPubSubHistoryCap ¶ added in v0.2.2
OptPubSubHistoryCap sets the capacity of the PubSub history cap.
func OptSourcesFile ¶ added in v0.2.0
OptSourcesFile sets the sources file.
func OptWorkspacesDirectory ¶ added in v0.1.5
OptWorkspacesDirectory sets the directory for workspaces.