chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model"
|
||||
)
|
||||
|
||||
// IImeiQueue publishes the additive IMEI-sync queue protocol. It is separate
|
||||
// from the status queue so the two full-sync chains can be enabled, scoped and
|
||||
// retried independently.
|
||||
type IImeiQueue interface {
|
||||
// StartImeiRun starts a full run and returns its runId.
|
||||
StartImeiRun(context.Context) (string, error)
|
||||
// StartImeiRunScoped narrows the run to a channel whitelist; a nil or empty
|
||||
// scope is a full sync.
|
||||
StartImeiRunScoped(context.Context, *model.SyncScope) (string, error)
|
||||
}
|
||||
|
||||
var localImeiQueue IImeiQueue
|
||||
|
||||
func ImeiQueue() IImeiQueue {
|
||||
if localImeiQueue == nil {
|
||||
panic("implement not found for interface IImeiQueue, forgot register?")
|
||||
}
|
||||
return localImeiQueue
|
||||
}
|
||||
|
||||
func RegisterImeiQueue(i IImeiQueue) { localImeiQueue = i }
|
||||
Reference in New Issue
Block a user