proxysql

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByPodIP

type ByPodIP []PodInfo

Define a custom type to implement the Sort interface.

func (ByPodIP) Len

func (a ByPodIP) Len() int

func (ByPodIP) Less

func (a ByPodIP) Less(i, j int) bool

func (ByPodIP) Swap

func (a ByPodIP) Swap(i, j int)

type PodInfo

type PodInfo struct {
	PodIP    string
	Hostname string
	UID      string
}

func GetCorePods

func GetCorePods(settings *configuration.Config) ([]PodInfo, error)

type ProbeResult

type ProbeResult struct {
	Status   string `json:"status,omitempty"`
	Message  string `json:"message,omitempty"`
	Clients  int    `json:"clients,omitempty"`
	Draining bool   `json:"draining,omitempty"`
	Probe    string `json:"probe,omitempty"`
	Backends struct {
		Total  int `json:"total,omitempty"`
		Online int `json:"online,omitempty"`
	} `json:"backends,omitempty"`
}

type ProxySQL

type ProxySQL struct {
	// contains filtered or unexported fields
}

func (*ProxySQL) Conn

func (p *ProxySQL) Conn() *sql.DB

func (*ProxySQL) Core

func (p *ProxySQL) Core()

func (*ProxySQL) DumpData

func (p *ProxySQL) DumpData()

data we eventually want to load into snowflake

  1. stats_mysql_query_digests (maybe use _reset to reset the state)
  2. mysql_query_rules
  3. stats_mysql_query_rules

FIXME: all these functions dump to /tmp/XXXX/Y.csv; we want the directory to be configurable at least.

func (*ProxySQL) DumpQueryRules

func (p *ProxySQL) DumpQueryRules(tmpdir string) (string, error)

ProxySQL docs: https://proxysql.com/documentation/main-runtime/#mysql_query_rules

func (*ProxySQL) GetBackends

func (p *ProxySQL) GetBackends() (map[string]int, error)

func (*ProxySQL) GetMissingCorePods

func (p *ProxySQL) GetMissingCorePods() (int, error)

func (*ProxySQL) New

func (p *ProxySQL) New(configs *configuration.Config) (*ProxySQL, error)

func (*ProxySQL) Ping

func (p *ProxySQL) Ping() error

func (*ProxySQL) ProbeClients

func (p *ProxySQL) ProbeClients() (int, error)

func (*ProxySQL) RunProbes

func (p *ProxySQL) RunProbes() (ProbeResult, error)

func (*ProxySQL) Satellite

func (p *ProxySQL) Satellite()

func (*ProxySQL) SatelliteResync

func (p *ProxySQL) SatelliteResync() error

Jump to

Keyboard shortcuts

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