cockroach

package
v2.38.2-0...-94d1eb7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminUser

type AdminUser struct {
	// ExistingDatabase is the database to connect to before the ZITADEL database exists
	ExistingDatabase string
	User             `mapstructure:",squash"`
}

type Config

type Config struct {
	Host            string
	Port            uint16
	Database        string
	MaxOpenConns    uint32
	MaxIdleConns    uint32
	MaxConnLifetime time.Duration
	MaxConnIdleTime time.Duration
	User            User
	Admin           AdminUser
	// Additional options to be appended as options=<Options>
	// The value will be taken as is. Multiple options are space separated.
	Options string
}

func (*Config) Connect

func (c *Config) Connect(useAdmin bool, pusherRatio, spoolerRatio float64, purpose dialect.DBPurpose) (*sql.DB, error)

func (*Config) DatabaseName

func (c *Config) DatabaseName() string

func (*Config) Decode

func (_ *Config) Decode(configs []interface{}) (dialect.Connector, error)

func (*Config) MatchName

func (c *Config) MatchName(name string) bool

func (*Config) Password

func (c *Config) Password() string

func (Config) String

func (c Config) String(useAdmin bool, appName string) string

func (*Config) Timetravel

func (c *Config) Timetravel(d time.Duration) string

func (*Config) Type

func (c *Config) Type() string

func (*Config) Username

func (c *Config) Username() string

type SSL

type SSL struct {
	// type of connection security
	Mode string
	// RootCert Path to the CA certificate
	RootCert string
	// Cert Path to the client certificate
	Cert string
	// Key Path to the client private key
	Key string
}

type User

type User struct {
	Username string
	Password string
	SSL      SSL
}

Jump to

Keyboard shortcuts

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