mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 12:59:23 +08:00
9131a5554a
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
21 lines
370 B
Go
21 lines
370 B
Go
package master
|
|
|
|
type ddRequestScheduler struct {
|
|
reqQueue chan *task
|
|
scheduleTimeStamp Timestamp
|
|
}
|
|
|
|
func NewDDRequestScheduler() *ddRequestScheduler {
|
|
const channelSize = 1024
|
|
|
|
rs := ddRequestScheduler{
|
|
reqQueue: make(chan *task, channelSize),
|
|
}
|
|
return &rs
|
|
}
|
|
|
|
func (rs *ddRequestScheduler) Enqueue(task *task) error {
|
|
rs.reqQueue <- task
|
|
return nil
|
|
}
|