tidb

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 9 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 {
	Store            string `toml:"store"`
	AdvertiseAddress string `toml:"advertise-address"`
	Host             string `toml:"host"`
	Path             string `toml:"path"`

	Security Security `toml:"security"`

	Log Log `toml:"log"`

	InitializeSQLFile          string            `toml:"initialize-sql-file"`
	GracefulWaitBeforeShutdown int               `toml:"graceful-wait-before-shutdown"`
	ServerLabels               map[string]string `toml:"labels"`
}

Config is a subset config of tidb Only our managed fields are defined in here. ref: https://github.com/pingcap/tidb/blob/master/pkg/config/config.go

func (*Config) Overlay

func (c *Config) Overlay(cluster *v1alpha1.Cluster, tidb *v1alpha1.TiDB, fg features.Gates) error

func (*Config) Validate

func (c *Config) Validate(tidb *v1alpha1.TiDB) error

type Log

type Log struct {
	SlowQueryFile string `toml:"slow-query-file"`
}

type Security

type Security struct {
	// TLS config for communication between TiDB server and MySQL client
	SSLCA   string `toml:"ssl-ca"`
	SSLCert string `toml:"ssl-cert"`
	SSLKey  string `toml:"ssl-key"`

	// mTLS config
	ClusterSSLCA   string `toml:"cluster-ssl-ca"`
	ClusterSSLCert string `toml:"cluster-ssl-cert"`
	ClusterSSLKey  string `toml:"cluster-ssl-key"`

	// tidb_auth_token
	AuthTokenJwks string `toml:"auth-token-jwks"`

	// If tiproxy is enabled, need to set these configs.
	// https://docs.pingcap.com/tidb/stable/tidb-configuration-file/#session-token-signing-cert-new-in-v640
	SessionTokenSigningKey  string `toml:"session-token-signing-key"`
	SessionTokenSigningCert string `toml:"session-token-signing-cert"`
}

type StandBy

type StandBy struct {
	// StandByMode indicates whether to enable the standby mode.
	StandByMode *bool `toml:"standby-mode,omitempty"`
}

Jump to

Keyboard shortcuts

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