Documentation ¶
Index ¶
- func Caller(depth ...int) string
- func IsError(err error, re string) bool
- func IsPError(pErr *roachpb.Error, re string) bool
- func IsSQLRetryError(err error) bool
- func MakeCaller(depth ...int) func() string
- func MakeKey(keys ...[]byte) []byte
- func NewNodeTestBaseContext() *base.Context
- func NewTestBaseContext(user string) *base.Context
- func SortStructs(s interface{}, fieldName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Caller ¶
Caller returns filename and line number info for the specified stack depths. The info is formated as <file>:<line> and each entry is separated for a space.
func IsError ¶
IsError returns true if err is non-nil and the error string matches the supplied regexp.
func IsPError ¶
IsPError returns true if pErr is non-nil and the error message matches the supplied regexp.
func IsSQLRetryError ¶
IsSQLRetryError returns true if err is retryable. This is true for errors that show a connection issue or an issue with the node itself. This can occur when a node is restarting or is unstable in some other way.
func MakeCaller ¶
MakeCaller returns a function which will invoke Caller with the specified arguments.
func NewNodeTestBaseContext ¶
NewNodeTestBaseContext creates a base context for testing. This uses embedded certs and the default node user. The default node user has both server and client certificates.
func NewTestBaseContext ¶
NewTestBaseContext creates a secure base context for user.
func SortStructs ¶
func SortStructs(s interface{}, fieldName string)
SortStructs sorts the given slice of structs using the given field as the sort key.
Types ¶
This section is empty.