初始化项目
This commit is contained in:
86
config/config.example.yaml
Normal file
86
config/config.example.yaml
Normal file
@@ -0,0 +1,86 @@
|
||||
# CID服务商项目配置文件示例
|
||||
|
||||
# 服务器配置
|
||||
server:
|
||||
address: ":8080"
|
||||
dumpRouterMap: false
|
||||
|
||||
# 数据库配置
|
||||
database:
|
||||
default:
|
||||
type: "mysql"
|
||||
host: "localhost"
|
||||
port: "3306"
|
||||
user: "root"
|
||||
pass: ""
|
||||
name: "cid_service"
|
||||
charset: "utf8mb4"
|
||||
timezone: "Local"
|
||||
maxIdle: 10
|
||||
maxOpen: 100
|
||||
maxLifetime: 30
|
||||
|
||||
# Redis配置
|
||||
redis:
|
||||
default:
|
||||
address: "127.0.0.1:6379"
|
||||
db: 1
|
||||
pass: ""
|
||||
|
||||
# JWT配置
|
||||
jwt:
|
||||
secret: "your-secret-key"
|
||||
expire: 7200 # 2小时
|
||||
|
||||
# 日志配置
|
||||
logger:
|
||||
level: "info"
|
||||
stdout: true
|
||||
path: "./logs"
|
||||
file: "cid-service.log"
|
||||
|
||||
# 广告源配置
|
||||
ad_sources:
|
||||
google:
|
||||
api_key: "your-google-ads-api-key"
|
||||
customer_id: "your-customer-id"
|
||||
developer_token: "your-developer-token"
|
||||
facebook:
|
||||
app_id: "your-facebook-app-id"
|
||||
app_secret: "your-facebook-app-secret"
|
||||
access_token: "your-facebook-access-token"
|
||||
ad_account_id: "your-ad-account-id"
|
||||
|
||||
# 策略配置
|
||||
strategy:
|
||||
default:
|
||||
basic:
|
||||
min_conversion: 0.01
|
||||
max_conversion: 0.05
|
||||
source_weights:
|
||||
self: 100
|
||||
google: 0
|
||||
facebook: 0
|
||||
max_ads_per_req: 3
|
||||
standard:
|
||||
min_conversion: 0.05
|
||||
max_conversion: 0.15
|
||||
source_weights:
|
||||
self: 70
|
||||
google: 20
|
||||
facebook: 10
|
||||
max_ads_per_req: 5
|
||||
premium:
|
||||
min_conversion: 0.15
|
||||
max_conversion: 1.0
|
||||
source_weights:
|
||||
self: 40
|
||||
google: 30
|
||||
facebook: 30
|
||||
max_ads_per_req: 10
|
||||
|
||||
# 监控配置
|
||||
monitoring:
|
||||
enable_metrics: true
|
||||
enable_tracing: true
|
||||
jaeger_endpoint: "http://localhost:14268/api/traces"
|
||||
Reference in New Issue
Block a user