mysqlctlclient

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package mysqlctlclient contains the generic client side of the remote mysqlctl protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFactory

func RegisterFactory(name string, factory Factory)

RegisterFactory allows a client implementation to register itself

Types

type Factory

type Factory func(network, addr string) (MysqlctlClient, error)

Factory functions are registered by client implementations.

type MysqlctlClient

type MysqlctlClient interface {
	// Start calls Mysqld.Start remotely.
	Start(ctx context.Context, mysqldArgs ...string) error

	// Shutdown calls Mysqld.Shutdown remotely.
	Shutdown(ctx context.Context, waitForMysqld bool) error

	// RunMysqlUpgrade calls Mysqld.RunMysqlUpgrade remotely.
	RunMysqlUpgrade(ctx context.Context) error

	// ApplyBinlogFile calls Mysqld.ApplyBinlogFile remotely.
	ApplyBinlogFile(ctx context.Context, req *mysqlctlpb.ApplyBinlogFileRequest) error

	// ReadBinlogFilesTimestamps calls Mysqld.ReadBinlogFilesTimestamps remotely.
	ReadBinlogFilesTimestamps(ctx context.Context, req *mysqlctlpb.ReadBinlogFilesTimestampsRequest) (*mysqlctlpb.ReadBinlogFilesTimestampsResponse, error)

	// ReinitConfig calls Mysqld.ReinitConfig remotely.
	ReinitConfig(ctx context.Context) error

	// RefreshConfig calls Mysqld.RefreshConfig remotely.
	RefreshConfig(ctx context.Context) error

	// VersionString calls Mysqld.VersionString remotely.
	VersionString(ctx context.Context) (string, error)

	// Close will terminate the connection. This object won't be used anymore.
	Close()
}

MysqlctlClient defines the interface used to send remote mysqlctl commands

func New

func New(network, addr string) (MysqlctlClient, error)

New creates a client implementation as specified by a flag.

Jump to

Keyboard shortcuts

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