mirror of
https://github.com/hanzo-fi/go-libs.git
synced 2026-10-30 20:53:44 +00:00
13 lines
289 B
Go
13 lines
289 B
Go
package transportfx
|
|
|
|
import (
|
|
"go.uber.org/fx"
|
|
|
|
"github.com/hanzo-fi/go-libs/v5/pkg/transport/httpserver"
|
|
)
|
|
|
|
// FXHook converts an httpserver.Hook into an fx.Hook for use with fx.Lifecycle.
|
|
func FXHook(h httpserver.Hook) fx.Hook {
|
|
return fx.Hook{OnStart: h.OnStart, OnStop: h.OnStop}
|
|
}
|