Documentation ¶
Index ¶
- Constants
- func OnRetireLeader()
- func RegistryMetrics()
- func RemoveDDLPending(task string)
- func RemoveWorkerState(name string)
- func ReportDDLError(task, errType string)
- func ReportDDLPending(task, oldStatus, newStatus string)
- func ReportStartLeader()
- func ReportWorkerEventErr(errType string)
- func ReportWorkerStage(name string, state float64)
- func RunBackgroundJob(ctx context.Context)
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 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 ¶
ReportWorkerStage is a setter for workerState.
func RunBackgroundJob ¶
RunBackgroundJob do periodic job.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.