pool

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalConnectionPool = NewConnectionPool()

Global connection pool instance

Functions

func InitializeGlobalPools

func InitializeGlobalPools(ctx context.Context) error

InitializeGlobalPools initializes all global connection pools

Types

type AWS_EC2Pool

type AWS_EC2Pool struct {
	// contains filtered or unexported fields
}

AWS EC2 Pool

type AzureComputePool

type AzureComputePool struct {
	// contains filtered or unexported fields
}

Azure Compute Pool

type AzureResourcePool

type AzureResourcePool struct {
	// contains filtered or unexported fields
}

Azure Resource Pool

type ConnectionPool

type ConnectionPool struct {
	// contains filtered or unexported fields
}

ConnectionPool manages connection pools for different services

func GetGlobalConnectionPool

func GetGlobalConnectionPool() *ConnectionPool

GetGlobalConnectionPool returns the global connection pool instance

func NewConnectionPool

func NewConnectionPool() *ConnectionPool

NewConnectionPool creates a new connection pool

func (*ConnectionPool) Close

func (p *ConnectionPool) Close() error

Close closes all connections in the pools

func (*ConnectionPool) GetAWSClient

func (p *ConnectionPool) GetAWSClient() (*ec2.Client, error)

GetAWSClient returns an AWS EC2 client from the pool

func (*ConnectionPool) GetAzureComputeClient

func (p *ConnectionPool) GetAzureComputeClient() (*armcompute.VirtualMachinesClient, error)

GetAzureComputeClient returns an Azure Compute client from the pool

func (*ConnectionPool) GetAzureResourceClient

func (p *ConnectionPool) GetAzureResourceClient() (*armresources.Client, error)

GetAzureResourceClient returns an Azure Resource client from the pool

func (*ConnectionPool) GetGCPClient

func (p *ConnectionPool) GetGCPClient() (*compute.InstancesClient, error)

GetGCPClient returns a GCP Compute client from the pool

func (*ConnectionPool) GetPoolStats

func (p *ConnectionPool) GetPoolStats() map[string]interface{}

GetPoolStats returns statistics about the connection pools

func (*ConnectionPool) GetRedisClient

func (p *ConnectionPool) GetRedisClient() (*redis.Client, error)

GetRedisClient returns a Redis client from the pool

func (*ConnectionPool) HealthCheck

func (p *ConnectionPool) HealthCheck(ctx context.Context) error

HealthCheck performs health check on all pools

func (*ConnectionPool) InitializeAWSPool

func (p *ConnectionPool) InitializeAWSPool(config aws.Config, poolSize int) error

InitializeAWSPool initializes AWS EC2 connection pool

func (*ConnectionPool) InitializeAzureComputePool

func (p *ConnectionPool) InitializeAzureComputePool(cred azcore.TokenCredential, subscriptionID string, poolSize int) error

InitializeAzureComputePool initializes Azure Compute connection pool

func (*ConnectionPool) InitializeAzureResourcePool

func (p *ConnectionPool) InitializeAzureResourcePool(cred azcore.TokenCredential, subscriptionID string, poolSize int) error

InitializeAzureResourcePool initializes Azure Resource connection pool

func (*ConnectionPool) InitializeGCPPool

func (p *ConnectionPool) InitializeGCPPool(ctx context.Context, poolSize int) error

InitializeGCPPool initializes GCP Compute connection pool

func (*ConnectionPool) InitializeRedisPool

func (p *ConnectionPool) InitializeRedisPool(options *redis.Options, poolSize int) error

InitializeRedisPool initializes Redis connection pool

type GCPComputePool

type GCPComputePool struct {
	// contains filtered or unexported fields
}

GCP Compute Pool

type RedisPool

type RedisPool struct {
	// contains filtered or unexported fields
}

Redis Pool

Jump to

Keyboard shortcuts

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