connection

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: BSD-3-Clause Imports: 4 Imported by: 31 modules, 65 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsShared

func IsShared(manager Manager) bool

func ManagerFactories added in v0.10.0

func ManagerFactories() map[string]ManagerFactory

func Managers

func Managers() map[string]Manager

func RegisterManager

func RegisterManager(connectionId string, manager Manager) error

func RegisterManagerFactory

func RegisterManagerFactory(factory ManagerFactory) error

func ReplaceManagerFactory added in v0.10.2

func ReplaceManagerFactory(ref string, factory ManagerFactory) error

func ResolveConfig added in v0.9.4

func ResolveConfig(config *Config) error

Types

type Config

type Config struct {
	Ref      string                 `json:"ref,omitempty"`
	Settings map[string]interface{} `json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func ToConfig

func ToConfig(config map[string]interface{}) (*Config, error)

type Manager

type Manager interface {
	Type() string

	GetConnection() interface{}

	ReleaseConnection(connection interface{})
}

func GetManager

func GetManager(id string) Manager

func NewManager

func NewManager(config *Config) (Manager, error)

func NewSharedManager

func NewSharedManager(id string, config *Config) (Manager, error)

type ManagerFactory

type ManagerFactory interface {
	Type() string

	NewManager(settings map[string]interface{}) (Manager, error)
}

func GetManagerFactory

func GetManagerFactory(ref string) ManagerFactory

Jump to

Keyboard shortcuts

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