Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
GRPCPort int `yaml:"grpc_port"`
ProfileHost string `yaml:"profile_host"`
ProfilePort int `yaml:"profile_port"`
Dir string `yaml:"dir"`
MaxSize int `yaml:"max_size"`
HtpasswdFile string `yaml:"htpasswd_file"`
TLSCaFile string `yaml:"tls_ca_file"`
TLSCertFile string `yaml:"tls_cert_file"`
TLSKeyFile string `yaml:"tls_key_file"`
S3CloudStorage *S3CloudStorageConfig `yaml:"s3_proxy,omitempty"`
GoogleCloudStorage *GoogleCloudStorageConfig `yaml:"gcs_proxy,omitempty"`
HTTPBackend *HTTPBackendConfig `yaml:"http_proxy,omitempty"`
NumUploaders int `yaml:"num_uploaders"`
MaxQueuedUploads int `yaml:"max_queued_uploads"`
IdleTimeout time.Duration `yaml:"idle_timeout"`
DisableHTTPACValidation bool `yaml:"disable_http_ac_validation"`
DisableGRPCACDepsCheck bool `yaml:"disable_grpc_ac_deps_check"`
EnableACKeyInstanceMangling bool `yaml:"enable_ac_key_instance_mangling"`
EnableEndpointMetrics bool `yaml:"enable_endpoint_metrics"`
MetricsDurationBuckets []float64 `yaml:"endpoint_metrics_duration_buckets"`
ExperimentalRemoteAssetAPI bool `yaml:"experimental_remote_asset_api"`
HTTPReadTimeout time.Duration `yaml:"http_read_timeout"`
HTTPWriteTimeout time.Duration `yaml:"http_write_timeout"`
}
Config holds the top-level configuration for bazel-remote.
func New ¶
func New(dir string, maxSize int, host string, port int, grpcPort int, profileHost string, profilePort int, htpasswdFile string, maxQueuedUploads int, numUploaders int, tlsCaFile string, tlsCertFile string, tlsKeyFile string, idleTimeout time.Duration, s3 *S3CloudStorageConfig, disableHTTPACValidation bool, disableGRPCACDepsCheck bool, enableACKeyInstanceMangling bool, enableEndpointMetrics bool, experimentalRemoteAssetAPI bool, httpReadTimeout time.Duration, httpWriteTimeout time.Duration) (*Config, error)
New returns a validated Config with the specified values, and an error if there were any problems with the validation.
func NewFromYamlFile ¶
NewFromYamlFile reads configuration settings from a YAML file then returns a validated Config with those settings, and an error if there were any problems.
type GoogleCloudStorageConfig ¶
type GoogleCloudStorageConfig struct {
Bucket string `yaml:"bucket"`
UseDefaultCredentials bool `yaml:"use_default_credentials"`
JSONCredentialsFile string `yaml:"json_credentials_file"`
}
GoogleCloudStorageConfig stores the configuration of a GCS proxy backend.
type HTTPBackendConfig ¶
type HTTPBackendConfig struct {
BaseURL string `yaml:"url"`
}
HTTPBackendConfig stores the configuration for a HTTP proxy backend.
type S3CloudStorageConfig ¶
type S3CloudStorageConfig struct {
Endpoint string `yaml:"endpoint"`
Bucket string `yaml:"bucket"`
Prefix string `yaml:"prefix"`
AccessKeyID string `yaml:"access_key_id"`
SecretAccessKey string `yaml:"secret_access_key"`
DisableSSL bool `yaml:"disable_ssl"`
IAMRoleEndpoint string `yaml:"iam_role_endpoint"`
Region string `yaml:"region"`
KeyVersion int `yaml:"key_version"`
}
S3CloudStorageConfig stores the configuration of an S3 API proxy backend.
Click to show internal directories.
Click to hide internal directories.