mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 09:38:39 +08:00
issue: #33285 - add two grpc resolver (by session and by streaming coord assignment service) - add one grpc balancer (by serverID and roundrobin) - add lazy conn to avoid block by first service discovery - add some utility function for streaming service Signed-off-by: chyezh <chyezh@outlook.com>
24 lines
529 B
Go
24 lines
529 B
Go
//go:build test
|
|
// +build test
|
|
|
|
package resource
|
|
|
|
import (
|
|
"github.com/milvus-io/milvus/internal/streamingnode/client/manager"
|
|
)
|
|
|
|
// OptStreamingManagerClient provides streaming manager client to the resource.
|
|
func OptStreamingManagerClient(c manager.ManagerClient) optResourceInit {
|
|
return func(r *resourceImpl) {
|
|
r.streamingNodeManagerClient = c
|
|
}
|
|
}
|
|
|
|
// InitForTest initializes the singleton of resources for test.
|
|
func InitForTest(opts ...optResourceInit) {
|
|
r = &resourceImpl{}
|
|
for _, opt := range opts {
|
|
opt(r)
|
|
}
|
|
}
|