35 lines
765 B
Go
35 lines
765 B
Go
//go:build wireinject
|
|
// +build wireinject
|
|
|
|
package app
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/google/wire"
|
|
)
|
|
|
|
// InitializeApp builds the fully assembled App and an aggregated cleanup function
|
|
// from the command-line config locators. The body is a Wire injector declaration;
|
|
// the real implementation is generated into wire_gen.go by `go generate`.
|
|
func InitializeApp(ctx context.Context, cli CLIArgs) (*App, func(), error) {
|
|
wire.Build(
|
|
provideConfig,
|
|
provideTracerProvider,
|
|
provideServiceToken,
|
|
providePostgres,
|
|
provideParsePool,
|
|
provideSearchPool,
|
|
provideStorageRedis,
|
|
provideLockerRedis,
|
|
provideAnchorPool,
|
|
provideRabbit,
|
|
provideTaskWorker,
|
|
provideAlertManager,
|
|
provideEngine,
|
|
provideServer,
|
|
provideApp,
|
|
)
|
|
return nil, nil, nil
|
|
}
|