Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // EnvPrefix 是 GAM 環境變數的前墬 EnvPrefix string )
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Env string Mode string Logs []LogSetting Databases []Database Temporal struct { Address string } Redis struct { ClusterMode bool `yaml:"cluster_mode"` Addresses []string `yaml:"addresses"` Password string `yaml:"password"` MaxRetries int `yaml:"max_retries"` PoolSizePerNode int `yaml:"pool_size_per_node"` DB int `yaml:"db"` } Jaeger struct { AdvertiseAddr string `yaml:"advertise_addr"` } BFF struct { HTTPBind string `yaml:"http_bind"` HTTPAdvertiseAddr string `yaml:"http_advertise_addr"` } Event struct { GRPCBind string `yaml:"grpc_bind"` GRPCAdvertiseAddr string `yaml:"grpc_advertise_addr"` } Wallet struct { GRPCBind string `yaml:"grpc_bind"` GRPCAdvertiseAddr string `yaml:"grpc_advertise_addr"` } // contains filtered or unexported fields }
Configuration 用來代表 config 設定物件
func (Configuration) InitDatabase ¶
func (cfg Configuration) InitDatabase(name string) (*gorm.DB, error)
func (Configuration) InitLogger ¶
func (cfg Configuration) InitLogger(appID string)
func (Configuration) InitTracer ¶
func (cfg Configuration) InitTracer(appID string) func()
InitTracer creates a new trace provider instance and registers it as global trace provider.
func (Configuration) Path ¶
func (cfg Configuration) Path(path ...string) string
Click to show internal directories.
Click to hide internal directories.