initializeHTTPClient creates and configures the HTTP client for webhook requests
()
| 99 | |
| 100 | // initializeHTTPClient creates and configures the HTTP client for webhook requests |
| 101 | func initializeHTTPClient() *http.Client { |
| 102 | return &http.Client{ |
| 103 | Timeout: 30 * time.Second, |
| 104 | Transport: &http.Transport{ |
| 105 | MaxIdleConns: 100, |
| 106 | MaxIdleConnsPerHost: 10, |
| 107 | IdleConnTimeout: 90 * time.Second, |
| 108 | }, |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | // NewLedgerForge initializes a new instance of LedgerForge with the provided database datasource. |
| 113 | // It fetches the configuration, initializes Redis client, balance tracker, queue, and search client. |