mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Related to #39095 https://go.dev/doc/modules/version-numbers Update pkg version according to golang dep version convention --------- Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
24 lines
691 B
Go
24 lines
691 B
Go
package consumer
|
|
|
|
import (
|
|
"github.com/milvus-io/milvus/pkg/v2/streaming/util/message"
|
|
)
|
|
|
|
// nopCloseHandler is a handler that do nothing when close.
|
|
type nopCloseHandler struct {
|
|
message.Handler
|
|
HandleInterceptor func(handleParam message.HandleParam, h message.Handler) message.HandleResult
|
|
}
|
|
|
|
// Handle is the callback for handling message.
|
|
func (nch nopCloseHandler) Handle(handleParam message.HandleParam) message.HandleResult {
|
|
if nch.HandleInterceptor != nil {
|
|
return nch.HandleInterceptor(handleParam, nch.Handler)
|
|
}
|
|
return nch.Handler.Handle(handleParam)
|
|
}
|
|
|
|
// Close is called after all messages are handled or handling is interrupted.
|
|
func (nch nopCloseHandler) Close() {
|
|
}
|