config

package
v0.89.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Config stores the global configuration
	Config config
)

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 the logged

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

func Load(file io.Reader) error

Load initializes the Config variable from file and the environment.

Environment variables take precedence over the file.

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

func StoragePath(storageName string) (string, bool)

StoragePath looks up the base path for storageName. The second boolean return value indicates if anything was found.

func Validate added in v0.13.0

func Validate() error

Validate checks the current Config for sanity.

Types

type Auth added in v0.13.0

type Auth struct {
	Transitioning bool  `toml:"transitioning"`
	Token         Token `toml:"token"`
}

Auth contains the authentication settings for this Gitaly process.

type Concurrency added in v0.43.0

type Concurrency struct {
	RPC        string `toml:"rpc"`
	MaxPerRepo int    `toml:"max_per_repo"`
}

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"`
}

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 {
	Format    string
	SentryDSN string `toml:"sentry_dsn"`
}

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"`
}

Ruby contains setting for Ruby worker processes

type Storage

type Storage struct {
	Name string
	Path string
}

Storage contains a single storage-shard

type Token added in v0.13.0

type Token string

Token is a string of the form "name:secret". It specifies a Gitaly authentication token.

func (Token) Equal added in v0.13.0

func (t Token) Equal(other string) bool

Equal tests if t is equal to the token specified by name and secret.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL