metrics

package
v0.0.0-...-592a62f Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DDLPendingNone     = "None"
	DDLPendingUnSynced = "Un-synced"
	DDLPendingSynced   = "Synced"
)

used for ddlPendingCounter, no "Resolved" lock because they will be remove quickly and not pending anymore.

View Source
const (
	InfoErrSyncLock    = "InfoPut - SyncLockError"
	InfoErrHandleLock  = "InfoPut - HandleLockError"
	OpErrRemoveLock    = "OperationPut - RemoveLockError"
	OpErrLockUnSynced  = "OperationPut - LockUnSyncedError"
	OpErrPutNonOwnerOp = "OperationPut - PutNonOwnerOpError"
)

used to show error type when handle DDLs.

View Source
const (
	WorkerEventHandle = "handle"
	WorkerEventWatch  = "watch"
)

used to represent worker event error type.

Variables

This section is empty.

Functions

func OnRetireLeader

func OnRetireLeader()

OnRetireLeader cleans some metrics when retires.

func RegistryMetrics

func RegistryMetrics()

RegistryMetrics registries metrics for worker.

func RemoveDDLPending

func RemoveDDLPending(task string)

RemoveDDLPending removes all counter of this task.

func RemoveWorkerState

func RemoveWorkerState(name string)

RemoveWorkerState cleans state of deleted worker.

func ReportDDLError

func ReportDDLError(task, errType string)

ReportDDLError is a setter for ddlErrCounter.

func ReportDDLPending

func ReportDDLPending(task, oldStatus, newStatus string)

ReportDDLPending inc/dec by 1 to ddlPendingCounter.

func ReportStartLeader

func ReportStartLeader()

ReportStartLeader increases startLeaderCounter by one.

func ReportWorkerEventErr

func ReportWorkerEventErr(errType string)

ReportWorkerEventErr is a setter for workerEventErrCounter.

func ReportWorkerStage

func ReportWorkerStage(name string, state float64)

ReportWorkerStage is a setter for workerState.

func RunBackgroundJob

func RunBackgroundJob(ctx context.Context)

RunBackgroundJob do periodic job.

Types

This section is empty.

Jump to

Keyboard shortcuts

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