provider

package
v1.1.50 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionOverride

type ConnectionOverride func(options *api.ConnectionOptions)

ConnectionOverride generate client settings, but overriding parameters in the connection object

type Provider

type Provider interface {
	// ClientSettings returns client settings that should be used to connect within the pod to the target instance
	ClientSettings(...ConnectionOverride) (dbms.ClientSettings, error)
	// DetectDBMS detects the instance's DBMS (MySQL or Postgres)
	DetectDBMS() (api.DBMS, error)
	// Initialized returns true if the database instance has been initialized, false otherwise
	Initialized() (bool, error)
	// Initialize performs any necessary initialization to set up the instance for future connections
	Initialize() error
	// PodSpec returns information about Kubernetes resources that should be created to connect to the database instance
	PodSpec(...ConnectionOverride) (podrun.ProviderSpec, error)
}

Provider abstracts provider-specific features for Google CloudSQL, Azure, or K8s that are related to initializing and connecting to a database instance. (Note that a Provider is coupled to a specific api.Connection).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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