package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
And returns a condition `AND(child1, child2, ...)`.
CreateSchedEventPolicy creates a SchedEventPolicy according to `SchedPolicyType` and `SchedPolicyExpr`.
NewCronPolicy creates a new CronPolicy.
NewDefaultTimerClient creates a new defaultTimerClient.
NewMemoryTimerStore creates a memory store for timers.
NewMemTimerWatchEventNotifier creates a notifier with memory implement.
NewOptionalVal creates a new OptionalVal.
NewSchedIntervalPolicy creates a new SchedIntervalPolicy.
Not returns a condition `NOT(cond)`.
Or returns a condition `OR(child1, child2, ...)`.
ValidateTimeZone validates the TimeZone field.
WithID indicates to get a timer with the specified id.
WithKey indicates to get a timer with the specified key.
WithKeyPrefix to get timers with the indicated key prefix.
WithSetEnable indicates to set the timer's `Enable` field.
WithSetSchedExpr indicates to set the timer's schedule policy.
WithSetSummaryData indicates to set the timer's summary.
WithSetTags indicates to set the timer's tags.
WithSetTimeZone sets the timezone of the timer.
WithSetWatermark indicates to set the timer's watermark.
WithTag indicates to get a timer with the specified tags.
# Constants
DefaultStoreNamespace is the default namespace.
OperatorAnd means 'AND' operator.
OperatorOr means 'OR' operator.
SchedEventCron indicates to schedule events by cron expression.
SchedEventIdle means the timer is not in trigger state currently.
SchedEventInterval indicates to schedule events every fixed interval.
SchedEventTrigger means the timer is in trigger state.
WatchTimerEventCreate indicates that a new timer is created.
WatchTimerEventDelete indicates that a timer is deleted.
WatchTimerEventUpdate indicates that a timer is updated.
# Variables
ErrEventIDNotMatch indicates that the timer's event id not match.
ErrTimerExists indicates that the specified timer already exits.
ErrTimerNotExist indicates that the specified timer not exist.
ErrVersionNotMatch indicates that the timer's version not match.
# Structs
CronPolicy implements SchedEventPolicy, it is the policy of type `SchedEventCron`.
EventExtra stores some extra attributes for event.
ManualRequest is the request info to trigger timer manually.
Operator implements Cond.
OptionalVal is used by `TimerCond` and `TimerUpdate` to indicate.
PreSchedEventResult is the result of `OnPreSchedEvent`.
SchedIntervalPolicy implements SchedEventPolicy, it is the policy of type `SchedEventInterval`.
TimerCond is the condition to filter a timer record.
TimerRecord is the timer record saved in the timer store.
TimerSpec is the specification of a timer without any runtime status.
TimerStore extends TimerStoreCore to provide some extra methods for timer operations.
TimerUpdate indicates how to update a timer.
WatchTimerEvent is the watch event object.
WatchTimerResponse is the response of watch.
# Interfaces
Cond is an interface to match a timer record.
Hook is an interface which should be implemented by user to tell framework how to trigger an event.
SchedEventPolicy is an interface to tell the runtime how to schedule a timer's events.
TimerClient is an interface exposed to user to manage timers.
TimerShedEvent is an interface which gives the timer's schedule event's information.
TimerStoreCore is an interface, it contains several core methods of store.
TimerWatchEventNotifier is used to notify timer watch events.
# Type aliases
GetTimerOption is the option to get timers.
HookFactory is the factory function to construct a new Hook object with `hookClass`.
OperatorTp is the operator type of the condition.
SchedEventStatus is the current schedule status of timer's event.
SchedPolicyType is the type of the event schedule policy.
UpdateTimerOption is the option to update the timer.
WatchTimerEventType is the type of the watch event.