Documentation
¶
Index ¶
- type Config
- type Connector
- func (c *Connector) Close() error
- func (c *Connector) Connect(ctx context.Context, request types.Request) error
- func (c *Connector) Disconnect(ctx context.Context, request types.Request) error
- func (c *Connector) ListConnections() ([]db.Connection, error)
- func (c *Connector) ListGateways(ctx context.Context) []types.Gateway
- type Initializer
- type LogLevel
- type LoggerConfig
- type LoggerOutputConfig
- type ProviderManager
- func (p *ProviderManager) Close() error
- func (p *ProviderManager) InitializeAvailableProviders(ctx context.Context, logger *logrus.Entry, configs map[string]interface{})
- func (p *ProviderManager) InitializeProvider(ctx context.Context, logger *logrus.Entry, providerName string, ...) (provider.Provider, error)
- func (p *ProviderManager) Provider(name string) (provider.Provider, error)
- func (p *ProviderManager) Providers() []provider.Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The Configurations for providers to be used. Providers map[string]interface{} // The configuration for Logging System in CSP // Connector. Logger LoggerConfig }
func LoadConfig ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
func (*Connector) Disconnect ¶
func (*Connector) ListConnections ¶
func (c *Connector) ListConnections() ([]db.Connection, error)
type Initializer ¶
type LoggerConfig ¶
type LoggerConfig struct { // The global Log Level inherited by every // component which has no explicit level configured. Level LogLevel // The map of Log Levels per given Component. // The Component name is picked as follows: // <PROVIDER NAME>:<LOGGER NAME> // So, for example for AWS Provider with Client // component, the name will be as follows ComponentLevels map[string]LogLevel // Configuring where the logs should be presented // or directed. Output LoggerOutputConfig }
type LoggerOutputConfig ¶
type LoggerOutputConfig struct { // If set to true, the Logger will print logs to // standard output. StdOut bool // The FilePath of an output logger file. // // If the FilePath is empty, there will be no // attempt to log to any file. // // Invalid FilePath will result in an error of the // CLI. FilePath string }
type ProviderManager ¶
type ProviderManager struct {
// contains filtered or unexported fields
}
func NewProviderManager ¶
func NewProviderManager(logger *logrus.Entry) (ProviderManager, error)
func (*ProviderManager) Close ¶
func (p *ProviderManager) Close() error
func (*ProviderManager) InitializeAvailableProviders ¶
func (p *ProviderManager) InitializeAvailableProviders( ctx context.Context, logger *logrus.Entry, configs map[string]interface{}, )
InitializeAvailableProviders initializes all providers which implementation was found or provided to the connector.
This function doesn't break if any provider fails to initialize but will log the error.
func (*ProviderManager) InitializeProvider ¶
func (*ProviderManager) Provider ¶
func (p *ProviderManager) Provider(name string) (provider.Provider, error)
func (*ProviderManager) Providers ¶
func (p *ProviderManager) Providers() []provider.Provider
Source Files
¶
Click to show internal directories.
Click to hide internal directories.