<commit_before>package serviceenv

// Configuration is the generic configuration structure used to access configuration fields.
type Configuration struct {
	*GlobalConfiguration
	*PachdSpecificConfiguration
	*WorkerSpecificConfiguration
}

// GlobalConfiguration contains the global configuration.
type GlobalConfiguration struct {
	FeatureFlags
	EtcdHost            string `env:"ETCD_SERVICE_HOST,required"`
	EtcdPort            string `env:"ETCD_SERVICE_PORT,required"`
	PPSWorkerPort       uint16 `env:"PPS_WORKER_GRPC_PORT,default=1080"`
	Port                uint16 `env:"PORT,default=1650"`
	PeerPort            uint16 `env:"PEER_PORT,default=1653"`
	S3GatewayPort       uint16 `env:"S3GATEWAY_PORT,default=1600"`
	PPSEtcdPrefix       string `env:"PPS_ETCD_PREFIX,default=pachyderm_pps"`
	Namespace           string `env:"PACH_NAMESPACE,default=default"`
	StorageRoot         string `env:"PACH_ROOT,default=/pach"`
	GCPercent           int    `env:"GC_PERCENT,default=50"`
	LokiHost            string `env:"LOKI_SERVICE_HOST"`
	LokiPort            string `env:"LOKI_SERVICE_PORT"`
	OidcPort            uint16 `env:"OIDC_PORT,default=1657"`
	PostgresServiceHost string `env:"POSTGRES_SERVICE_HOST"`
	PostgresServicePort int    `env:"POSTGRES_SERVICE_PORT"`
	PostgresServiceSSL  string `env:"POSTGRES_SERVICE_SSL,default=disable"`
	PostgresDBName      string `env:"POSTGRES_DATABASE_NAME"`

	EtcdPrefix           string `env:"ETCD_PREFIX,default="`
	DeploymentID         string `env:"CLUSTER_DEPLOYMENT_ID,default="`
	LogLevel             string `env:"LOG_LEVEL,default=info"`
	AuthEtcdPrefix       string `env:"PACHYDERM_AUTH_ETCD_PREFIX,default=pachyderm_auth"`
	IdentityEtcdPrefix   string `env:"PACHYDERM_IDENTITY_ETCD_PREFIX,default=pachyderm_identity"`
	EnterpriseEtcdPrefix string `env:"PACHYDERM_ENTERPRISE_ETCD_PREFIX,default=pachyderm_enterprise"`
	Metrics              bool   `env:"METRICS,default=true"`
	MetricsEndpoint      string `env:"METRICS_ENDPOINT,default="`

	// SessionDurationMinutes it how long auth tokens are valid for, defaults to 30 days (30 * 24 * 60)
	SessionDurationMinutes int `env:"SESSION_DURATION_MINUTES,default=43200"`<commit_msg>Remove unused env vars (#6391)<commit_after>package serviceenv

// Configuration is the generic configuration structure used to access configuration fields.
type Configuration struct {
	*GlobalConfiguration
	*PachdSpecificConfiguration
	*WorkerSpecificConfiguration
}

// GlobalConfiguration contains the global configuration.
type GlobalConfiguration struct {
	FeatureFlags
	EtcdHost            string `env:"ETCD_SERVICE_HOST,required"`
	EtcdPort            string `env:"ETCD_SERVICE_PORT,required"`
	PPSWorkerPort       uint16 `env:"PPS_WORKER_GRPC_PORT,default=1080"`
	Port                uint16 `env:"PORT,default=1650"`
	PeerPort            uint16 `env:"PEER_PORT,default=1653"`
	S3GatewayPort       uint16 `env:"S3GATEWAY_PORT,default=1600"`
	PPSEtcdPrefix       string `env:"PPS_ETCD_PREFIX,default=pachyderm_pps"`
	Namespace           string `env:"PACH_NAMESPACE,default=default"`
	StorageRoot         string `env:"PACH_ROOT,default=/pach"`
	GCPercent           int    `env:"GC_PERCENT,default=50"`
	LokiHost            string `env:"LOKI_SERVICE_HOST"`
	LokiPort            string `env:"LOKI_SERVICE_PORT"`
	OidcPort            uint16 `env:"OIDC_PORT,default=1657"`
	PostgresServiceHost string `env:"POSTGRES_SERVICE_HOST"`
	PostgresServicePort int    `env:"POSTGRES_SERVICE_PORT"`
	PostgresServiceSSL  string `env:"POSTGRES_SERVICE_SSL,default=disable"`
	PostgresDBName      string `env:"POSTGRES_DATABASE_NAME"`

	EtcdPrefix           string `env:"ETCD_PREFIX,default="`
	DeploymentID         string `env:"CLUSTER_DEPLOYMENT_ID,default="`
	LogLevel             string `env:"LOG_LEVEL,default=info"`
	EnterpriseEtcdPrefix string `env:"PACHYDERM_ENTERPRISE_ETCD_PREFIX,default=pachyderm_enterprise"`
	Metrics              bool   `env:"METRICS,default=true"`
	MetricsEndpoint      string `env:"METRICS_ENDPOINT,default="`

	// SessionDurationMinutes it how long auth tokens are valid for, defaults to 30 days (30 * 24 * 60)
	SessionDurationMinutes int `env:"SESSION_DURATION_MINUTES,default=43200"`
{'fraction_non_alphanumeric': 0.08982035928143713, 'fraction_numerical': 0.02347305389221557, 'mean_word_length': 4.728395061728395, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6181176', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1303, 'n_words': 241}