Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errorf ¶
Errorf creates a formatted error wrapped in a CodedError. This is a convenience function that combines fmt.Errorf with MakeCodedError.
func GetErrorCode ¶
GetErrorCode extracts the error code from anywhere in the error chain. Returns empty string if no CodedError is found.
func GetErrorSubCode ¶
GetErrorSubCode extracts the error subcode from anywhere in the error chain. Returns empty string if no CodedError is found or if SubCode is not set.
Types ¶
type CodedError ¶
CodedError wraps an error with a string code for categorization. The code can be extracted from anywhere in an error chain using GetErrorCode. SubCode provides additional granularity for error classification.
func MakeCodedError ¶
func MakeCodedError(code string, err error) CodedError
MakeCodedError creates a new CodedError with the given code and error.
func MakeSubCodedError ¶
func MakeSubCodedError(code string, subCode string, err error) CodedError
MakeSubCodedError creates a new CodedError with the given code, subcode, and error.
func (CodedError) Error ¶
func (e CodedError) Error() string
func (CodedError) Unwrap ¶
func (e CodedError) Unwrap() error
type QuickReorderQueue ¶
type QuickReorderQueue[T any] struct { // contains filtered or unexported fields }
func MakeQuickReorderQueue ¶
func MakeQuickReorderQueue[T any](bufSize int, timeout time.Duration) *QuickReorderQueue[T]
func (*QuickReorderQueue[T]) C ¶
func (q *QuickReorderQueue[T]) C() <-chan T
func (*QuickReorderQueue[T]) Close ¶
func (q *QuickReorderQueue[T]) Close()
func (*QuickReorderQueue[T]) QueueItem ¶
func (q *QuickReorderQueue[T]) QueueItem(sessionId string, seqNum int, data T) error
func (*QuickReorderQueue[T]) SetNextSeqNum ¶
func (q *QuickReorderQueue[T]) SetNextSeqNum(seqNum int)
type SyncCache ¶
type SyncCache[T any] struct { // contains filtered or unexported fields }
func MakeSyncCache ¶
type VersionTs ¶
type VersionTs struct {
// contains filtered or unexported fields
}
func (*VersionTs) GetVersionTs ¶
type WorkQueue ¶
type WorkQueue[T any] struct { // contains filtered or unexported fields }