chore: 并入 iotlcm-admin-svr 历史到 admin-svr/(原提交 49818c6)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package service
|
||||
|
||||
import "context"
|
||||
|
||||
type (
|
||||
IPackageLifecycle interface {
|
||||
Sync(ctx context.Context)
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
localPackageLifecycle IPackageLifecycle
|
||||
)
|
||||
|
||||
func PackageLifecycle() IPackageLifecycle {
|
||||
if localPackageLifecycle == nil {
|
||||
panic("implement not found for interface IPackageLifecycle, forgot register?")
|
||||
}
|
||||
return localPackageLifecycle
|
||||
}
|
||||
|
||||
func RegisterPackageLifecycle(i IPackageLifecycle) {
|
||||
localPackageLifecycle = i
|
||||
}
|
||||
Reference in New Issue
Block a user