Zhen Ye 858dc10ef9
enhance: broadcast with event-based notification (#39550)
issue: #38399
pr: #39522

- 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>
2025-02-07 11:50:50 +08:00

35 lines
878 B
Go

package client
import (
"github.com/milvus-io/milvus/internal/streamingcoord/client/assignment"
"github.com/milvus-io/milvus/internal/util/streamingutil/service/lazygrpc"
"github.com/milvus-io/milvus/internal/util/streamingutil/service/resolver"
)
// clientImpl is the implementation of Client.
type clientImpl struct {
conn lazygrpc.Conn
rb resolver.Builder
assignmentService *assignment.AssignmentServiceImpl
broadcastService BroadcastService
}
func (c *clientImpl) Broadcast() BroadcastService {
return c.broadcastService
}
// Assignment access assignment service.
func (c *clientImpl) Assignment() AssignmentService {
return c.assignmentService
}
// Close close the client.
func (c *clientImpl) Close() {
if c.assignmentService != nil {
c.assignmentService.Close()
}
c.broadcastService.Close()
c.conn.Close()
c.rb.Close()
}