Documentation
¶
Index ¶
- type Connection
- type ConnectionConfig
- type ConnectionManager
- func (cm *ConnectionManager) AddDriverCredentials(ctx context.Context, config *models.DriverCredentials)
- func (cm *ConnectionManager) GetConnection(ctx context.Context, tenantID string) (*Connection, error)
- func (cm *ConnectionManager) GetProjectDependedSettings() ProjectDependedSettings
- func (cm *ConnectionManager) GetStats() ConnectionStats
- func (cm *ConnectionManager) SetProjectDefaultMediaPlugin(defaultStorageProviderId string)
- func (cm *ConnectionManager) SetProjectLogicExecutionProvider(activatedLogicExecutionProvidersID string)
- type ConnectionStats
- type ProjectDependedSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { DBConn interfaces.ProjectDBInterface LastAccessed time.Time IsActive bool }
Connection represents a database connection with metadata
type ConnectionConfig ¶
type ConnectionConfig struct { TenantID string Driver string ConnString string MaxIdleConn int MaxOpenConn int MaxLifetime time.Duration }
ConnectionConfig holds the database connection configuration for a tenant
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
ConnectionManager manages database connections for multiple tenants
func NewConnectionManager ¶
func NewConnectionManager(cfg *models.Config, maxConns int, systemDB interfaces.ApitoSystemDB) *ConnectionManager
NewConnectionManager creates a new connection manager
func (*ConnectionManager) AddDriverCredentials ¶
func (cm *ConnectionManager) AddDriverCredentials(ctx context.Context, config *models.DriverCredentials)
AddDriverCredentials adds a new connection configuration for a tenant
func (*ConnectionManager) GetConnection ¶
func (cm *ConnectionManager) GetConnection(ctx context.Context, tenantID string) (*Connection, error)
GetConnection returns a database connection for the given tenant
func (*ConnectionManager) GetProjectDependedSettings ¶
func (cm *ConnectionManager) GetProjectDependedSettings() ProjectDependedSettings
GetProjectDependedSettings returns project dependent settings
func (*ConnectionManager) GetStats ¶
func (cm *ConnectionManager) GetStats() ConnectionStats
GetStats returns current connection statistics
func (*ConnectionManager) SetProjectDefaultMediaPlugin ¶
func (cm *ConnectionManager) SetProjectDefaultMediaPlugin(defaultStorageProviderId string)
SetProjectDefaultMediaPlugin sets project dependent settings
func (*ConnectionManager) SetProjectLogicExecutionProvider ¶
func (cm *ConnectionManager) SetProjectLogicExecutionProvider(activatedLogicExecutionProvidersID string)
SetProjectLogicExecutionProvider sets project dependent settings
type ConnectionStats ¶
type ProjectDependedSettings ¶
Click to show internal directories.
Click to hide internal directories.