config

package
v0.0.0-...-60b7e97 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigPathFlag    = "config"
	DefaultConfigPath = "config.yaml"
	LogLevelFlag      = "level"

	AwsRegionEnvVar  = "AWS_REGION"
	DefaultAwsRegion = "us-west-2"

	GcpRegionEnvVar  = "GCP_REGION"
	DefaultGcpRegion = "us-central1"
)

Variables

View Source
var Module = fx.Provide(
	newConfigProvider,
)

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Type   string                 `yaml:"type"`
	Config map[string]interface{} `yaml:"config"`
}

type CachingConfig

type CachingConfig struct {
	MaxCache int    `yaml:"max_cache,omitempty"`
	MaxAge   string `yaml:"max_age,omitempty"`
	MaxUsage int    `yaml:"max_usage,omitempty"`
}

type ConfigProvider

type ConfigProvider interface {
	GetProxyConfig() ProxyConfig
}

type EncryptionConfig

type EncryptionConfig struct {
	Type   string                 `yaml:"type"`
	Config map[string]interface{} `yaml:"config"`
}

type GlobalEncryptionConfig

type GlobalEncryptionConfig struct {
	Caching CachingConfig `yaml:"caching"`
}

func (*GlobalEncryptionConfig) Validate

func (g *GlobalEncryptionConfig) Validate() []error

type MetricsConfig

type MetricsConfig struct {
	Port int `yaml:"port"`
}

func (*MetricsConfig) Validate

func (m *MetricsConfig) Validate() []error

type ProxyConfig

type ProxyConfig struct {
	Server     ServerConfig           `yaml:"server"`
	Metrics    MetricsConfig          `yaml:"metrics"`
	Encryption GlobalEncryptionConfig `yaml:"encryption"`
	Workloads  []WorkloadConfig       `yaml:"workloads"`
}

func LoadConfig

func LoadConfig(configFilePath string) (ProxyConfig, error)

func (*ProxyConfig) Validate

func (p *ProxyConfig) Validate() error

type ServerConfig

type ServerConfig struct {
	Port int    `yaml:"port"`
	Host string `yaml:"host"`
}

func (*ServerConfig) Validate

func (s *ServerConfig) Validate() []error

type TLSConfig

type TLSConfig struct {
	CertFile string `yaml:"cert_file"`
	KeyFile  string `yaml:"key_file"`
}

type TemporalApiKeyConfig

type TemporalApiKeyConfig struct {
	Value  string `yaml:"value,omitempty"`
	EnvVar string `yaml:"env,omitempty"`
}

type TemporalAuthConfig

type TemporalAuthConfig struct {
	TLS    *TLSConfig            `yaml:"tls,omitempty"`
	ApiKey *TemporalApiKeyConfig `yaml:"api_key,omitempty"`
}

type TemporalCloudConfig

type TemporalCloudConfig struct {
	Namespace      string             `yaml:"namespace"`
	HostPort       string             `yaml:"host_port"`
	Authentication TemporalAuthConfig `yaml:"authentication"`
}

type WorkloadConfig

type WorkloadConfig struct {
	WorkloadId     string              `yaml:"workload_id"`
	TemporalCloud  TemporalCloudConfig `yaml:"temporal_cloud"`
	Encryption     *EncryptionConfig   `yaml:"encryption,omitempty"`
	Authentication *AuthConfig         `yaml:"authentication,omitempty"`
}

func (*WorkloadConfig) Validate

func (w *WorkloadConfig) Validate() []error

Jump to

Keyboard shortcuts

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