congqixia cb7f2fa6fd
enhance: Use v2 package name for pkg module (#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-22 23:15:58 +08:00

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