mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 23:45:28 +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>
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
package broadcaster
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/milvus-io/milvus/internal/streamingcoord/server/broadcaster/registry"
|
|
"github.com/milvus-io/milvus/pkg/v2/streaming/util/message"
|
|
"github.com/milvus-io/milvus/pkg/v2/streaming/util/types"
|
|
)
|
|
|
|
type Broadcaster interface {
|
|
// Broadcast broadcasts the message to all channels.
|
|
Broadcast(ctx context.Context, msg message.BroadcastMutableMessage) (*types.BroadcastAppendResult, error)
|
|
|
|
// Ack acknowledges the message at the specified vchannel.
|
|
Ack(ctx context.Context, req types.BroadcastAckRequest) error
|
|
|
|
// Watch watches the broadcast event.
|
|
NewWatcher() (Watcher, error)
|
|
|
|
// Close closes the broadcaster.
|
|
Close()
|
|
}
|
|
|
|
// Watcher is the interface for watching the broadcast event.
|
|
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()
|
|
}
|
|
|
|
type AppendOperator = registry.AppendOperator
|