manager

package
v0.0.0-...-146a38b Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: BSD-3-Clause, Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMetrics

func RegisterMetrics()

RegisterMetrics registers the cluster managemnent metrics.

Types

type ClusterManager

type ClusterManager struct {

	// Instance is the local instance of MySQL under management.
	Instance *cluster.Instance
	// contains filtered or unexported fields
}

ClusterManager manages the local MySQL instance's membership of an InnoDB cluster.

func NewClusterManager

func NewClusterManager(
	kubeClient kubernetes.Interface,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	mysqlshFactory func(string) mysqlsh.Interface,
	instance *cluster.Instance,
) *ClusterManager

NewClusterManager creates a InnoDB cluster ClusterManager.

func NewLocalClusterManger

func NewLocalClusterManger(kubeclient kubernetes.Interface, kubeInformerFactory kubeinformers.SharedInformerFactory) (*ClusterManager, error)

NewLocalClusterManger creates a new cluster.ClusterManager for the local MySQL instance.

func (*ClusterManager) Run

func (m *ClusterManager) Run(ctx context.Context)

Run runs the ClusterManager controller. NOTE: ctx is not currently used for cancellation by caller (the stopCh is).

func (*ClusterManager) Sync

func (m *ClusterManager) Sync(ctx context.Context) bool

Sync ensures that the MySQL database instance managed by this instance of the agent is part of the InnoDB cluster and is online.

Jump to

Keyboard shortcuts

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