gitee.com/sy_183/go-common@v1.0.5-0.20231205030221-958cfe129b47/lifecycle.v2/manager/manager.go (about) 1 package manager 2 3 import ( 4 "gitee.com/sy_183/go-common/container" 5 "gitee.com/sy_183/go-common/lifecycle.v2" 6 "sync/atomic" 7 ) 8 9 type LifecycleHolder struct { 10 name string 11 lifecycle atomic.Pointer[lifecycle.Lifecycle] 12 after []string 13 before []string 14 requires []string 15 wants []string 16 } 17 18 type Manager struct { 19 lifecycle.Lifecycle 20 lifecycle *lifecycle.DefaultLifecycle 21 22 lifecycles container.SyncMap[string, *LifecycleHolder] 23 }