Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValueStoreContext ¶
type ValueStoreContext interface { // SetValue saves a value associated with this context for key. SetValue(key fmt.Stringer, value any) // Value returns the value associated with this context for key. Value(key fmt.Stringer) any // ClearValue clears the value associated with this context for key. ClearValue(key fmt.Stringer) }
ValueStoreContext is a context that can store values.
type WarnHandler ¶
type WarnHandler interface { // AppendWarning appends a warning AppendWarning(err error) }
WarnHandler provides a function to add a warning. Using interface rather than a simple function/closure can avoid memory allocation in some cases. See https://github.com/pingcap/tidb/issues/49277
var IgnoreWarn WarnHandler = &ignoreWarn{}
IgnoreWarn is WarnHandler which does nothing
func NewFuncWarnHandlerForTest ¶
func NewFuncWarnHandlerForTest(fn func(err error)) WarnHandler
NewFuncWarnHandlerForTest creates a `WarnHandler` which will use the function to handle warn To have a better performance, it's not suggested to use this function in production.
Click to show internal directories.
Click to hide internal directories.