pool

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTPClient

func GetHTTPClient() *http.Client

GetHTTPClient returns the shared HTTP client (lazy initialization) The pool is created on first call with either configured or default values

func GetPool

func GetPool() *scriptlingPool

GetPool returns the scriptling pool as an HTTPPool interface

func SetConfig

func SetConfig(config *Config)

SetConfig sets up the shared connection pool configuration Must be called before any HTTP calls are made (before GetHTTPClient)

Types

type Config

type Config struct {
	// InsecureSkipVerify allows self-signed certificates
	// WARNING: This should be false in production for security
	InsecureSkipVerify bool

	// Connection pool settings
	MaxIdleConns        int
	MaxIdleConnsPerHost int
	IdleConnTimeout     time.Duration

	// Default timeout for requests
	Timeout time.Duration
}

Config holds configuration for the scriptling HTTP pool Optimized for short-lived, diverse HTTP requests (requests library, wait_for)

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns sensible defaults (secure by default) Optimized for short-lived scripting HTTP requests

func GetConfig

func GetConfig() Config

GetConfig returns the current pool configuration Returns a copy to prevent external modification of internal state

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL