Documentation ¶
Index ¶
- Constants
- func ConfigureConcurrencyLimits()
- func ConfigureLogging()
- func ConfigurePrometheus()
- func ConfigureRuby() error
- func ConfigureSentry(version string)
- func Load(file io.Reader) error
- func RegisterHook(f func() error)
- func SetGitPath() error
- func StoragePath(storageName string) (string, bool)
- func Validate() error
- type Auth
- type Cfg
- type Concurrency
- type Git
- type GitlabShell
- type Logging
- type Prometheus
- type Ruby
- type Storage
- type TLS
Constants ¶
const ( // EnvPidFile is the name of the environment variable containing the pid file path EnvPidFile = "GITALY_PID_FILE" // EnvUpgradesEnabled is an environment variable that when defined gitaly must enable graceful upgrades on SIGHUP EnvUpgradesEnabled = "GITALY_UPGRADES_ENABLED" )
Variables ¶
This section is empty.
Functions ¶
func ConfigureConcurrencyLimits ¶ added in v0.43.0
func ConfigureConcurrencyLimits()
ConfigureConcurrencyLimits configures the per-repo, per RPC rate limits
func ConfigureLogging ¶ added in v0.11.0
func ConfigureLogging()
ConfigureLogging uses the global conf and environmental vars to configure log levels and format
func ConfigurePrometheus ¶ added in v0.11.0
func ConfigurePrometheus()
ConfigurePrometheus uses the global configuration to configure prometheus
func ConfigureRuby ¶ added in v0.60.0
func ConfigureRuby() error
ConfigureRuby validates the gitaly-ruby configuration and sets default values.
func ConfigureSentry ¶ added in v0.11.0
func ConfigureSentry(version string)
ConfigureSentry configures the sentry DSN
func Load ¶
Load initializes the Config variable from file and the environment.
Environment variables take precedence over the file.
func RegisterHook ¶ added in v1.46.0
func RegisterHook(f func() error)
RegisterHook adds a post-validation callback.
func SetGitPath ¶ added in v0.18.0
func SetGitPath() error
SetGitPath populates the variable GitPath with the path to the `git` executable. It warns if no path was specified in the configuration.
func StoragePath ¶ added in v0.7.0
StoragePath looks up the base path for storageName. The second boolean return value indicates if anything was found.
Types ¶
type Cfg ¶ added in v1.47.0
type Cfg struct { SocketPath string `toml:"socket_path" split_words:"true"` ListenAddr string `toml:"listen_addr" split_words:"true"` TLSListenAddr string `toml:"tls_listen_addr" split_words:"true"` PrometheusListenAddr string `toml:"prometheus_listen_addr" split_words:"true"` BinDir string `toml:"bin_dir"` Git Git `toml:"git" envconfig:"git"` Storages []Storage `toml:"storage" envconfig:"storage"` Logging Logging `toml:"logging" envconfig:"logging"` Prometheus Prometheus `toml:"prometheus"` Auth Auth `toml:"auth"` TLS TLS `toml:"tls"` Ruby Ruby `toml:"gitaly-ruby"` GitlabShell GitlabShell `toml:"gitlab-shell"` Concurrency []Concurrency `toml:"concurrency"` GracefulRestartTimeout time.Duration GracefulRestartTimeoutToml duration `toml:"graceful_restart_timeout"` }
Cfg is a container for all config derived from config.toml.
var ( // Config stores the global configuration Config Cfg )
type Concurrency ¶ added in v0.43.0
Concurrency allows endpoints to be limited to a maximum concurrency per repo
type Git ¶ added in v0.18.0
type Git struct { BinPath string `toml:"bin_path"` // ProtocolV2Enabled can be set to true to enable the newer Git protocol // version. This should not be enabled until GitLab *either* stops // using transfer.hideRefs for security purposes, *or* Git protocol v2 // respects this setting: // // https://public-inbox.org/git/20181213155817.27666-1-avarab@gmail.com/T/ // // This is not user-configurable. Once a new Git version has been released, // we can add code to enable it if the detected git binary is new enough ProtocolV2Enabled bool CatfileCacheSize int `toml:"catfile_cache_size"` }
Git contains the settings for the Git executable
type GitlabShell ¶ added in v0.29.0
type GitlabShell struct {
Dir string `toml:"dir"`
}
GitlabShell contains the settings required for executing `gitlab-shell`
type Logging ¶ added in v0.11.0
type Logging struct { Dir string `toml:"dir"` Format string `toml:"format"` SentryDSN string `toml:"sentry_dsn"` RubySentryDSN string `toml:"ruby_sentry_dsn"` SentryEnvironment string `toml:"sentry_environment"` Level string `toml:"level"` }
Logging contains the logging configuration for Gitaly
type Prometheus ¶ added in v0.11.0
type Prometheus struct {
GRPCLatencyBuckets []float64 `toml:"grpc_latency_buckets"`
}
Prometheus contains additional configuration data for prometheus
type Ruby ¶ added in v0.26.0
type Ruby struct { Dir string `toml:"dir"` MaxRSS int `toml:"max_rss"` GracefulRestartTimeout time.Duration GracefulRestartTimeoutToml duration `toml:"graceful_restart_timeout"` RestartDelay time.Duration RestartDelayToml duration `toml:"restart_delay"` NumWorkers int `toml:"num_workers"` LinguistLanguagesPath string `toml:"linguist_languages_path"` }
Ruby contains setting for Ruby worker processes