tidb

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Address string `toml:"addr"`
}

type Config

type Config struct {
	Proxy    Proxy             `toml:"proxy"`
	API      API               `toml:"api"`
	Security Security          `toml:"security"`
	Labels   map[string]string `toml:"labels"`
}

Config is a subset config of TiProxy. Only TiDB Operator managed fields are defined here. ref: https://docs.pingcap.com/tidb/stable/tiproxy-configuration/

func (*Config) Overlay

func (c *Config) Overlay(cluster *v1alpha1.Cluster, tiproxy *v1alpha1.TiProxy) error

func (*Config) Validate

func (c *Config) Validate() error

type Proxy

type Proxy struct {
	Address          string `toml:"addr"`
	AdvertiseAddress string `toml:"advertise-addr"`
	PDAddress        string `toml:"pd-addrs"`
}

type Security

type Security struct {
	// ServerSQLTLS is used to provide TLS between TiProxy and MySQL client.
	ServerSQLTLS TLSConfig `toml:"server-tls,omitempty"`
	// ServerHTTPTLS is used to provide TLS on HTTP status port.
	ServerHTTPTLS TLSConfig `toml:"server-http-tls,omitempty"`
	// ClusterTLS is used to access TiDB or PD.
	ClusterTLS TLSConfig `toml:"cluster-tls,omitempty"`
	// SQLTLS is used to access TiDB SQL port.
	SQLTLS TLSConfig `toml:"sql-tls,omitempty"`
}

type TLSConfig

type TLSConfig struct {
	Cert   string `toml:"cert,omitempty"`
	Key    string `toml:"key,omitempty"`
	CA     string `toml:"ca,omitempty"`
	SkipCA bool   `toml:"skip-ca,omitempty"`
}

Jump to

Keyboard shortcuts

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