mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-03 09:22:30 +08:00
issue: #33285 - register streaming coord service into datacoord. - add new streaming node role. - add global static switch to enable streaming service or not. Signed-off-by: chyezh <chyezh@outlook.com>
17 lines
596 B
Go
17 lines
596 B
Go
package streamingutil
|
|
|
|
import "os"
|
|
|
|
// IsStreamingServiceEnabled returns whether the streaming service is enabled.
|
|
func IsStreamingServiceEnabled() bool {
|
|
// TODO: check if the environment variable MILVUS_STREAMING_SERVICE_ENABLED is set
|
|
return os.Getenv("MILVUS_STREAMING_SERVICE_ENABLED") == "1"
|
|
}
|
|
|
|
// MustEnableStreamingService panics if the streaming service is not enabled.
|
|
func MustEnableStreamingService() {
|
|
if !IsStreamingServiceEnabled() {
|
|
panic("start a streaming node without enabling streaming service, please set environment variable MILVUS_STREAMING_SERVICE_ENABLED = 1")
|
|
}
|
|
}
|