v0.2.8 Latest Latest

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

Go to latest
Published: May 7, 2019 License: Apache-2.0 Imports: 22 Imported by: 0




View Source
const (
	// MysqlPortName represents the mysql port name.
	MysqlPortName = "mysql"
	// MysqlPort is the default mysql port.
	MysqlPort = constants.MysqlPort

	// OrcTopologyDir path where orc conf secret is mounted
	OrcTopologyDir = constants.OrcTopologyDir

	// SidecarServerPortName name of the port
	SidecarServerPortName = "sidecar-http"
	// SidecarServerPort represents the port on which http server will run
	SidecarServerPort = constants.SidecarServerPort
	// SidecarServerProbePath the probe path
	SidecarServerProbePath = constants.SidecarServerProbePath

	// ExporterPort is the port that metrics will be exported
	ExporterPort = constants.ExporterPort
	//ExporterPortName the name of the metrics exporter port
	ExporterPortName = "prometheus"
	// ExporterPath is the path on which metrics are expose
	ExporterPath = constants.ExporterPath

	// HelperDbName represent the database name that is used by operator to
	// manage the mysql cluster.
	HelperDbName = constants.HelperDbName

	// ConfVolumeMountPath is the path where mysql configs will be mounted
	ConfVolumeMountPath = constants.ConfVolumeMountPath
	// DataVolumeMountPath is the path to mysql data
	DataVolumeMountPath = constants.DataVolumeMountPath
	// ConfMapVolumeMountPath represents the temp config mount path in init containers
	ConfMapVolumeMountPath = constants.ConfMapVolumeMountPath
	// ConfDPath is the path to extra mysql configs dir
	ConfDPath = constants.ConfDPath

TODO: make those consts private and move them in the file where are used.


View Source
var (
	// TargetPort is the mysql port that is set for headless service and should be string
	TargetPort = intstr.FromInt(MysqlPort)

	// ExporterTargetPort is the port for the exporter
	ExporterTargetPort = intstr.FromInt(ExporterPort)


func IsPodNotFound added in v0.2.1

func IsPodNotFound(err error) bool

IsPodNotFound check if it's a PodNotFound error

func NewConfigMapSyncer

func NewConfigMapSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlcluster.MysqlCluster) syncer.Interface

NewConfigMapSyncer returns config map syncer

func NewError added in v0.2.1

func NewError(code SyncErrCode, syncer, details string) error

NewError returns a syncer error

func NewHeadlessSVCSyncer

func NewHeadlessSVCSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlcluster.MysqlCluster) syncer.Interface

NewHeadlessSVCSyncer returns a service syncer

func NewHealthySVCSyncer

func NewHealthySVCSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlcluster.MysqlCluster) syncer.Interface

NewHealthySVCSyncer returns a service syncer

func NewMasterSVCSyncer

func NewMasterSVCSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlcluster.MysqlCluster) syncer.Interface

NewMasterSVCSyncer returns a service syncer for master service

func NewPDBSyncer

func NewPDBSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlcluster.MysqlCluster) syncer.Interface

NewPDBSyncer returns the syncer for pdb

func NewPodNotFoundError added in v0.2.1

func NewPodNotFoundError() error

NewPodNotFoundError returns a PodNotFound error

func NewPodSyncer

func NewPodSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlcluster.MysqlCluster, host string) syncer.Interface

NewPodSyncer returns the syncer for pod

func NewSecretSyncer

func NewSecretSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlcluster.MysqlCluster, opt *options.Options) syncer.Interface

NewSecretSyncer returns secret syncer nolint: gocyclo

func NewStatefulSetSyncer

func NewStatefulSetSyncer(c client.Client, scheme *runtime.Scheme, cluster *mysqlcluster.MysqlCluster, cmRev, secRev string, opt *options.Options) syncer.Interface

NewStatefulSetSyncer returns a syncer for stateful set


type SyncErrCode added in v0.2.1

type SyncErrCode int

SyncErrCode is the error code

const (
	// PodNotFound represents the error when pod is not found
	PodNotFound SyncErrCode = iota

type SyncError added in v0.2.1

type SyncError struct {
	// contains filtered or unexported fields

SyncError is the error type for pod syncer

func (*SyncError) Error added in v0.2.1

func (e *SyncError) Error() string

Jump to

Keyboard shortcuts

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