package
1.0.0
Repository: https://github.com/phanitejak/kptgolib.git
Documentation: pkg.go.dev

# Functions

CommonDefaultsWithRetry implements common default middlewares Mark, IgnoreErrors and Retry.
Duration will print how long it took to execute passed handler function.
IgnoreErrors will silently ignore all returned errors from handler and continue.
Log will handle debug and error logging.
Mark will always mark offset after HandlerFunc gets executed.
Markable will return markable error if given error is markable.
MarkIfNoError will mark offset after HandlerFunc gets executed if no error or markable error was returned.
Middleware returns CtxHandlerFunc type for services requiring middleware.
MultiPartitionMark stores internally latest mark function for each partition and creates mark function which executes those stored mark functions.
Recover will recover panics in message processing and logs.
Retry will try to call given HandlerFunc maxRetries times if returned error is retryable.
Retryable will return retryable error if given error is not nil.
Serial will synchronise access to next handler.
Trace will create span from message and in case of error it will add error log field in span.

# Type aliases

CtxHandlerFunc message handler function type.
MessageHandlerFunc defines kafka message handling function for Middleware.