forked from mtusi2026/mtusi2026lab5
9 lines
243 B
Go
9 lines
243 B
Go
package controller
|
|
|
|
import "go.uber.org/fx"
|
|
|
|
// RunControllerFx lets Fx own startup, signal handling and graceful shutdown.
|
|
func RunControllerFx(lc fx.Lifecycle, ctrl Controller) {
|
|
lc.Append(fx.Hook{OnStart: ctrl.Start, OnStop: ctrl.Stop})
|
|
}
|