Documentation
¶
Overview ¶
Package app owns the production application composition and lifecycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilecoinServices ¶
type FilecoinServices struct {
Market admin.WarmStorageMarket
ApprovedProviders observability.ApprovedProviderSource
Endorsements observability.EndorsedProviderSource
ChainID uint64
USDFCAddress string
Storage synapse.StorageClient
WalletQuery synapse.WalletQuerier
Wallet synapse.WalletOperator
Receipts wallet.WalletReceiptChecker
Readiness ReadinessProbe
Observability observability.RefreshChecker
// Terminator ends a replaced storage service. Epochs observes the chain so
// the gateway can tell an accepted termination from a completed one.
Terminator synapse.ServiceTerminator
Epochs synapse.ChainEpochReader
// CommitNonces reads the chain record that settles a storage commit the
// provider never confirmed.
CommitNonces synapse.CommitNonceReader
ParkedPieces synapse.ParkedPieceChecker
RemovalChain synapse.RemovalChainReader
}
FilecoinServices contains the externally owned Filecoin integrations used by the application runtime.
type ReadinessProbe ¶
type ReadinessProbe interface {
CheckRuntime(context.Context) synapse.ReadinessResult
CheckDraft(context.Context, synapse.ReadinessConfig) synapse.ReadinessResult
}
ReadinessProbe provides runtime and draft Filecoin readiness checks.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns all resources assembled by NewRuntime.
func NewRuntime ¶
func NewRuntime(ctx context.Context, opts RuntimeOptions) (_ *Runtime, err error)
NewRuntime validates dependencies and assembles the complete application.
func (*Runtime) AdminAddr ¶
AdminAddr returns the actual bound admin address, including an allocated dynamic port when configured with port zero.
type RuntimeOptions ¶
type RuntimeOptions struct {
Config *config.Config
Database *bun.DB
Settings *admin.SettingsService
Filecoin FilecoinServices
ProviderIdentity *admin.ProviderIdentityResolver
UploadSpeedProbe providerbenchmark.UploadProbe
DecorateTaskHandler func(taskengine.Handler) taskengine.Handler
S3Addresses []string
Logger *slog.Logger
ShutdownTimeout time.Duration
}
RuntimeOptions configures the application composition root. Database, settings, and Filecoin services remain owned by the caller.
Click to show internal directories.
Click to hide internal directories.