Documentation ¶
Index ¶
- type FakeApp
- type GlobalManager
- func (gm GlobalManager) ExecuteEvents(ctx sdk.Context, exec linotypes.EventExec)
- func (gm GlobalManager) ExportToFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
- func (gm GlobalManager) GetBCEventErrors(ctx sdk.Context) []linotypes.BCEventErr
- func (gm GlobalManager) GetEventErrors(ctx sdk.Context) []model.EventError
- func (gm GlobalManager) GetGlobalTime(ctx sdk.Context) model.GlobalTime
- func (gm GlobalManager) GetLastBlockTime(ctx sdk.Context) int64
- func (gm GlobalManager) GetPastDay(ctx sdk.Context, unixTime int64) int64
- func (gm GlobalManager) ImportFromFile(ctx sdk.Context, cdc *codec.Codec, filepath string) error
- func (gm GlobalManager) InitGenesis(ctx sdk.Context)
- func (gm GlobalManager) OnBeginBlock(ctx sdk.Context)
- func (gm GlobalManager) OnEndBlock(ctx sdk.Context)
- func (gm GlobalManager) RegisterEventAtTime(ctx sdk.Context, unixTime int64, event linotypes.Event) sdk.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeApp ¶
type FakeApp interface { Hourly(ctx sdk.Context) []linotypes.BCEventErr Daily(ctx sdk.Context) []linotypes.BCEventErr Monthly(ctx sdk.Context) []linotypes.BCEventErr Yearly(ctx sdk.Context) []linotypes.BCEventErr }
type GlobalManager ¶
type GlobalManager struct {
// contains filtered or unexported fields
}
GlobalManager - a event manager module, it schedules event, execute events and store errors of executed events.
func NewGlobalManager ¶
func NewGlobalManager(key sdk.StoreKey, keeper param.ParamKeeper, cdc *codec.Codec, hourly linotypes.BCEventExec, daily linotypes.BCEventExec, monthly linotypes.BCEventExec, yearly linotypes.BCEventExec, ) GlobalManager
NewGlobalManager - return the global manager
func (GlobalManager) ExecuteEvents ¶
func (gm GlobalManager) ExecuteEvents(ctx sdk.Context, exec linotypes.EventExec)
ExecuteEvents - execute events, log errors to storage, up to current time (exclusively).
func (GlobalManager) ExportToFile ¶
func (GlobalManager) GetBCEventErrors ¶
func (gm GlobalManager) GetBCEventErrors(ctx sdk.Context) []linotypes.BCEventErr
func (GlobalManager) GetEventErrors ¶
func (gm GlobalManager) GetEventErrors(ctx sdk.Context) []model.EventError
func (GlobalManager) GetGlobalTime ¶
func (gm GlobalManager) GetGlobalTime(ctx sdk.Context) model.GlobalTime
func (GlobalManager) GetLastBlockTime ¶
func (gm GlobalManager) GetLastBlockTime(ctx sdk.Context) int64
GetLastBlockTime - get last block time from KVStore
func (GlobalManager) GetPastDay ¶
func (gm GlobalManager) GetPastDay(ctx sdk.Context, unixTime int64) int64
GetPastDay - get start time from KVStore to calculate past day
func (GlobalManager) ImportFromFile ¶
func (GlobalManager) InitGenesis ¶
func (gm GlobalManager) InitGenesis(ctx sdk.Context)
func (GlobalManager) OnBeginBlock ¶
func (gm GlobalManager) OnBeginBlock(ctx sdk.Context)
OnBeginBlock - update internal time related fields and execute blockchain scheduled events.
func (GlobalManager) OnEndBlock ¶
func (gm GlobalManager) OnEndBlock(ctx sdk.Context)
OnEndBlock - update last block time.
func (GlobalManager) RegisterEventAtTime ¶
Click to show internal directories.
Click to hide internal directories.