Documentation
¶
Index ¶
Constants ¶
const ( ClientAPIKeyContextKey contextKey = "client_api_key" InstanceIDContextKey contextKey = "instance_id" )
Variables ¶
This section is empty.
Functions ¶
func ClientAPIKeyMiddleware ¶
ClientAPIKeyMiddleware validates client API keys and extracts instance information
func GetClientAPIKeyFromContext ¶
func GetClientAPIKeyFromContext(ctx context.Context) *models.ClientAPIKey
GetClientAPIKeyFromContext retrieves the client API key from the request context
func GetInstanceIDFromContext ¶
GetInstanceIDFromContext retrieves the instance ID from the request context
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool provides a thread-safe pool of byte slices for the reverse proxy
func NewBufferPool ¶
func NewBufferPool() *BufferPool
NewBufferPool creates a new buffer pool with 32KB buffers
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler manages reverse proxy requests to qBittorrent instances
func NewHandler ¶
func NewHandler(clientPool *qbittorrent.ClientPool, clientAPIKeyStore *models.ClientAPIKeyStore, instanceStore *models.InstanceStore, syncManager *qbittorrent.SyncManager, cache *reannounce.SettingsCache, svc *reannounce.Service, baseURL string) *Handler
NewHandler creates a new proxy handler
type RetryTransport ¶ added in v1.6.0
type RetryTransport struct {
// contains filtered or unexported fields
}
RetryTransport wraps an http.RoundTripper with retry logic for transient network errors
func NewRetryTransport ¶ added in v1.6.0
func NewRetryTransport(base http.RoundTripper) *RetryTransport
NewRetryTransport creates a new RetryTransport that wraps the given RoundTripper
func NewRetryTransportWithSelector ¶ added in v1.12.0
func NewRetryTransportWithSelector(base http.RoundTripper, selector func(*http.Request) http.RoundTripper) *RetryTransport
NewRetryTransportWithSelector creates a new RetryTransport using a per-request selector. The selector may return nil to fall back to the default base transport.