Skip to content

Latest commit

 

History

History
52 lines (44 loc) · 1.59 KB

reactions_storage.md

File metadata and controls

52 lines (44 loc) · 1.59 KB

Reactions Storage Server

  • Reactions Storage server — an HTTP web server that handles all incoming requests

Usage

  • . devtools/exenv .env
  • go run main.go --config configs/server.yaml

Configuration

General

  • Server configuration includes a single yaml file.
  • Configuration example: server.yaml.
  • Configuration file path should be given to the server binary via --config flag. Default value: "configs/server.yaml".

Settings

  • All available settings can be found in server.go.
  • gin — represents gin related settings (mode, middleware, http handlers, etc)
    • general
      • mode: debug/release/... — one of gin modes.
      • trusted_proxies — trusted proxies setting
    • middlewares
      • logger
        • enabled: true/false
      • recovery
        • enabled: true/false
      • prometheus
        • enabled: true/false
        • metrics_path — URL path for metrics handler
        • metrics
          • gin
            • enabled: true/flase
          • sql
            • enabled: true/false
          • debug
            • enabled: true/false
    • handlers
      • debug
        • pprof
          • enabled: true/false
          • path_prefix — URL path prefix for pprof handlers
        • mem_usage
          • enabled: true/false
          • path — URL path for mem usage handler
  • pg
    • pool
      • min_conns — min active connections to PostgreSQL
      • max_conns — max active connections to PostgreSQL
      • max_conns_lifetime_jitter_s — max random delay before closing active connection