congqixia 709594f158
enhance: [2.5] Use v2 package name for pkg module (#40117)
Cherry-pick from master
pr: #39990
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>
2025-02-23 00:46:01 +08:00

23 lines
535 B
Go

package assignment
import (
"context"
"github.com/milvus-io/milvus/pkg/v2/streaming/util/types"
)
var _ Watcher = (*watcherImpl)(nil)
// Watcher is the interface for the channel assignment.
type Watcher interface {
// Get gets the channel assignment.
Get(ctx context.Context, channel string) *types.PChannelInfoAssigned
// Watch watches the channel assignment.
// Block until new term is coming.
Watch(ctx context.Context, channel string, previous *types.PChannelInfoAssigned) error
// Close stop the watcher.
Close()
}