mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-06 02:42:53 +08:00
issue: #38399 - broadcast message can carry multi resource key now. - implement event-based notification for broadcast messages - broadcast message use broadcast id as a unique identifier in message - broadcasted message on vchannels keep the broadcasted vchannel now. - broadcasted message and broadcast message have a common broadcast header now. --------- Signed-off-by: chyezh <chyezh@outlook.com>
23 lines
475 B
Go
23 lines
475 B
Go
package broadcast
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/milvus-io/milvus/pkg/streaming/util/message"
|
|
)
|
|
|
|
type WatcherBuilder interface {
|
|
Build(ctx context.Context) (Watcher, error)
|
|
}
|
|
|
|
type Watcher interface {
|
|
// ObserveResourceKeyEvent observes the resource key event.
|
|
ObserveResourceKeyEvent(ctx context.Context, ev *message.BroadcastEvent) error
|
|
|
|
// EventChan returns the event channel.
|
|
EventChan() <-chan *message.BroadcastEvent
|
|
|
|
// Close closes the watcher.
|
|
Close()
|
|
}
|