Documentation
¶
Index ¶
- type App
- func (a *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (a *App) Configurator() module.Configurator
- func (a *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (a *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (a *App) Load(loadLatest bool) error
- func (a *App) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig)
- func (a *App) RegisterModules(modules ...module.AppModule) error
- func (a *App) RegisterTendermintService(clientCtx client.Context)
- func (a *App) RegisterTxService(clientCtx client.Context)
- func (a *App) UnsafeFindStoreKey(storeKey string) storetypes.StoreKey
- type AppBuilder
- type AppModuleBasicWrapper
- type AppModuleWrapper
- type BaseAppOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { *baseapp.BaseApp ModuleManager *module.Manager // contains filtered or unexported fields }
App is a wrapper around BaseApp and ModuleManager that can be used in hybrid app.go/app config scenarios or directly as a servertypes.Application instance. To get an instance of *App, *AppBuilder must be requested as a dependency in a container which declares the runtime module and the AppBuilder.Build() method must be called.
App can be used to create a hybrid app.go setup where some configuration is done declaratively with an app config and the rest of it is done the old way. See simapp/app.go for an example of this setup.
func (*App) BeginBlocker ¶
func (a *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*App) Configurator ¶
func (a *App) Configurator() module.Configurator
func (*App) EndBlocker ¶
func (a *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*App) InitChainer ¶
func (a *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer initializes the chain.
func (*App) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterModules ¶
RegisterModules registers the provided modules with the module manager and the basic module manager. This is the primary hook for integrating with modules which are not registered using the app config.
func (*App) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*App) UnsafeFindStoreKey ¶
func (a *App) UnsafeFindStoreKey(storeKey string) storetypes.StoreKey
UnsafeFindStoreKey fetches a registered StoreKey from the App in linear time.
NOTE: This should only be used in testing.
type AppBuilder ¶
type AppBuilder struct {
// contains filtered or unexported fields
}
AppBuilder is a type that is injected into a container by the runtime module (as *AppBuilder) which can be used to create an app which is compatible with the existing app.go initialization conventions.
func (*AppBuilder) Build ¶
func (a *AppBuilder) Build( logger log.Logger, db dbm.DB, traceStore io.Writer, baseAppOptions ...func(*baseapp.BaseApp), ) *App
Build builds an *App instance.
func (*AppBuilder) DefaultGenesis ¶
func (a *AppBuilder) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
type AppModuleBasicWrapper ¶
type AppModuleBasicWrapper struct {
module.AppModuleBasic
}
AppModuleBasicWrapper is a type used for injecting a module.AppModuleBasic into a container so that it can be used by the runtime module.
func WrapAppModuleBasic ¶
func WrapAppModuleBasic(basic module.AppModuleBasic) AppModuleBasicWrapper
WrapAppModuleBasic wraps a module.AppModuleBasic so that it can be injected into a container for use by the runtime module.
func (AppModuleBasicWrapper) IsOnePerModuleType ¶
func (AppModuleBasicWrapper) IsOnePerModuleType()
IsOnePerModuleType identifies this type as a depinject.OnePerModuleType.
type AppModuleWrapper ¶
AppModuleWrapper is a type used for injecting a module.AppModule into a container so that it can be used by the runtime module.
func WrapAppModule ¶
func WrapAppModule(appModule module.AppModule) AppModuleWrapper
WrapAppModule wraps a module.AppModule so that it can be injected into a container for use by the runtime module.
func (AppModuleWrapper) IsOnePerModuleType ¶
func (AppModuleWrapper) IsOnePerModuleType()
IsOnePerModuleType identifies this type as a depinject.OnePerModuleType.
type BaseAppOption ¶
BaseAppOption is a depinject.AutoGroupType which can be used to pass BaseApp options into the depinject. It should be used carefully.
func (BaseAppOption) IsManyPerContainerType ¶
func (b BaseAppOption) IsManyPerContainerType()
IsManyPerContainerType indicates that this is a depinject.ManyPerContainerType.