/
codespawn
/
tgstream
Обзор
Документация
Войти
/
codespawn
/
tgstream
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
16
CI/CD
Аналитика
Безопасность
master
config.yaml.example
58 строк
2 KB
codespawn
Запрос на слияние 'feat/cli-config-override' (
#14
) из feat/cli-config-override в master
26 июл 2026, 18:09
Верифицирован
26 июл 2026, 18:09
3472af2
Код
Авторство
О чём код?
# tgstream configuration file (YAML). # # Keys are nested by section and map to environment variables via flat # UPPER_SNAKE names with prefix TGSTREAM_: # store.db_path -> TGSTREAM_STORE_DB_PATH # cache.ttl -> TGSTREAM_CACHE_TTL # source.timeout -> TGSTREAM_SOURCE_TIMEOUT # ... # Section/subsection boundaries use dots; the full dotted path becomes the env # name (TGSTREAM_<SECTION>_<FIELD>). The addr field is computed: server.addr # (full host:port) takes priority over server.port. # # Priority (highest wins): CLI flags > environment variables > this file > # built-in defaults. Duration values use Go duration strings only (cache.ttl: # 5m, source.timeout: 15s); bare seconds are NOT supported. Setting # --config=./config.yaml (or TGSTREAM_CONFIG_FILE env) loads this file; # otherwise it is searched in ./, ~/.tgstream/, /etc/tgstream/. # # Upstream HTTP proxy is NOT configured here — it uses the standard Go mechanism # (HTTP_PROXY/HTTPS_PROXY/NO_PROXY via http.DefaultTransport), shared by Source # and media-proxy clients. # base_url: "" # public tgstream URL (for /media and atom:link self) # source: # configs_dir: "" # REQUIRED — dir with DSL extraction configs # render_url: "" # external render service (prerender-compatible) # timeout: 15s # max_concurrency: 4 # max_rps: 2 # user_agent: "tgstream/0.1 (+https://gitverse.ru/codespawn/tgstream)" # store: # db_path: "tgstream.db" # max_per_channel: 0 # 0 = unlimited # cache: # ttl: 5m # size: 1000 # server: # port: "8080" # port only; addr below takes priority # addr: ":8080" # full host:port (computed: addr > port > :8080) # read_header_timeout: 5s # read_timeout: 15s # write_timeout: 30s # idle_timeout: 2m # shutdown_timeout: 10s # media: # stateless media proxy (requires base_url when enabled) # proxy: # enabled: false # codec_secret: "" # HMAC secret for signed tokens (empty → plain base64url) # client_timeout: 20s # timeout for fetching one media file # allowed_hosts: [] # SSRF allowlist (host suffixes); empty → all rejected # feed: # item_limit: 20