planetscale

package
v0.11.691 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username string
	Password string
	Host     string
	Port     int
	Database string
}

Config describes a connection to PlanetScale, the managed Vitess platform. PlanetScale speaks the MySQL wire protocol, so the direct database connection reuses the MySQL driver; the ingestr URI uses the dedicated "ps_mysql" scheme, which ingestr routes through its hosted psdbconnect API (TLS is enabled automatically, so no SSL configuration is required). ingestr renamed this scheme from "planetscale" to "ps_mysql" in v1.0.62 to make room for PlanetScale Postgres.

func (Config) GetIngestrURI

func (c Config) GetIngestrURI() string

GetIngestrURI builds the ingestr source/destination URI using the dedicated "ps_mysql" scheme. ingestr enables TLS automatically for this scheme, and the ingestr operator derives the CDC scheme (ps_mysql+cdc://) by appending "+cdc". Note the scheme contains an underscore: url.URL.String() emits it fine, but net/url.Parse rejects it, so the ingestr operator extracts the scheme manually rather than round-tripping this URI through url.Parse.

func (Config) ToDBConnectionURI

func (c Config) ToDBConnectionURI() string

ToDBConnectionURI builds the go-sql-driver/mysql DSN used to open a direct connection (e.g. for `bruin connections test`). PlanetScale requires encrypted connections, so TLS is always enabled; go-sql-driver's tls=true verifies the server certificate against the system root CAs, which is valid for the public *.psdb.cloud endpoints.

Jump to

Keyboard shortcuts

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