chyezh 86eff6e589
enhance: streaming node client implementation (#34653)
issue: #33285

- add streaming node grpc client wrapper
- add unittest for streaming node grpc client side
- fix binary unsafe bug for message

---------

Signed-off-by: chyezh <chyezh@outlook.com>
2024-07-19 17:37:40 +08:00

23 lines
532 B
Go

package assignment
import (
"context"
"github.com/milvus-io/milvus/pkg/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()
}